This is an automated email from the ASF dual-hosted git repository.

maxyang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git

commit ecb66628d658388c169cccd87479723099baa742
Author: wenru yan <[email protected]>
AuthorDate: Wed May 11 18:21:46 2022 +0000

    fix compiler warning for genfile.c,util.c and nodeShareInputScan.c
    
    1.genfile.c:Commit b554f88 upgrade the adminpack functions to new version,
    the old version function won’t be used. And postgres keep the old version 
functions in backend,
    so add the declaration of these functions in builtins.h file to fix the 
compiler warning.
    2.util.c:warning: function ‘gp_fatal_log’ might be a candidate for 
‘gnu_printf’ format attribute
    [-Wsuggest-attribute=format], add the attribute gnu_printf to function 
gp_fatal_log.
    3.nodeShareInputScan.c: the format issue, change the whitespace to tab.
---
 src/backend/executor/nodeShareInputScan.c | 2 +-
 src/include/utils/builtins.h              | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/backend/executor/nodeShareInputScan.c 
b/src/backend/executor/nodeShareInputScan.c
index 3eae7e233a..ee9b9f1c39 100644
--- a/src/backend/executor/nodeShareInputScan.c
+++ b/src/backend/executor/nodeShareInputScan.c
@@ -374,7 +374,7 @@ ExecShareInputScan(PlanState *pstate)
         * ShareInputScan is one but not the last one of Sequence's subplans.
         */
        if (sisc->discard_output)
-         return NULL;
+               return NULL;
 
        slot = node->ss.ps.ps_ResultTupleSlot;
 
diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h
index c9991a77a8..ab41a00629 100644
--- a/src/include/utils/builtins.h
+++ b/src/include/utils/builtins.h
@@ -149,4 +149,10 @@ extern Datum gp_instrument_shmem_summary(PG_FUNCTION_ARGS);
 /* utils/gp/segadmin.c */
 extern bool gp_activate_standby(void);
 
+/* utils/adt/genfile.c */
+extern Datum pg_file_write(PG_FUNCTION_ARGS);
+extern Datum pg_file_rename(PG_FUNCTION_ARGS);
+extern Datum pg_file_unlink(PG_FUNCTION_ARGS);
+extern Datum pg_logdir_ls(PG_FUNCTION_ARGS);
+
 #endif                                                 /* BUILTINS_H */


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to