Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wKKDw-000r2Z-2E for pgsql-hackers@arkaria.postgresql.org; Tue, 05 May 2026 18:10:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wKKDu-00DDTE-0O for pgsql-hackers@arkaria.postgresql.org; Tue, 05 May 2026 18:10:22 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wKKDt-00DDT6-2I for pgsql-hackers@lists.postgresql.org; Tue, 05 May 2026 18:10:21 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wKKDo-00000000gua-1CaR for pgsql-hackers@postgresql.org; Tue, 05 May 2026 18:10:21 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.18.1/8.18.1) with ESMTP id 645IAAKR664782; Tue, 5 May 2026 14:10:11 -0400 From: Tom Lane To: Andreas Karlsson cc: =?UTF-8?Q?=C3=81lvaro_Herrera?= , Jelte Fennema-Nio , pgsql-hackers Subject: Re: Improve pgindent's formatting named fields in struct literals and varidic functions In-reply-to: <71e9889c-86be-4084-a5ae-fc535221b5fb@proxel.se> References: <202603311716.cribie6xvxhn@alvherre.pgsql> <2737243.1774980800@sss.pgh.pa.us> <9a949301-eb31-4245-aef5-6ced20716ec4@proxel.se> <71e9889c-86be-4084-a5ae-fc535221b5fb@proxel.se> Comments: In-reply-to Andreas Karlsson message dated "Sun, 12 Apr 2026 23:06:24 +0200" MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" Content-ID: <664734.1778004581.0@sss.pgh.pa.us> Date: Tue, 05 May 2026 14:10:10 -0400 Message-ID: <664781.1778004610@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="us-ascii" Content-ID: <664734.1778004581.1@sss.pgh.pa.us> Andreas Karlsson writes: > Rebased patch on top of HEAD. I've reviewed and tested this, and attached is the version I have staged for commit. Differences from yours: * Bump pg_bsd_indent's version number to ensure people use the right version. * Include the change in tests/declarations.0.stdout in the main patch. Without this, "make check-world" fails after that patch. We don't want to create land-mines like that for future git bisect runs. v6-0002 shows the effects the patch would currently have. This isn't a commit, since the effects could very well still change before this gets committed. regards, tom lane ------- =_aaaaaaaaaa0 Content-Type: text/x-diff; name*0="v6-0001-Make-pg_bsd_indent-add-a-space-between-comma-and-.p"; name*1="atch"; charset="us-ascii" Content-ID: <664734.1778004581.2@sss.pgh.pa.us> Content-Description: v6-0001-Make-pg_bsd_indent-add-a-space-between-comma-and-.patch Content-Transfer-Encoding: quoted-printable =46rom a8b82e80140193402eb007b40904e29f8d766e50 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 5 May 2026 13:57:13 -0400 Subject: [PATCH v6] Make pg_bsd_indent add a space between comma and perio= d. Formatting of variadic functions and struct literals with named fields used to be ugly due to pg_bsd_indent treating period as always being a binary operator. After a comma, it's not that, so insert a space. Bump pg_bsd_indent's version so that people who use out-of-tree copies will know they need to update. Author: Andreas Karlsson Reviewed-by: Tom Lane Discussion: https://postgr.es/m/c3327be8-09e2-46a1-88b4-228a339d6916@proxe= l.se --- src/tools/pg_bsd_indent/args.c | 2 +- src/tools/pg_bsd_indent/indent.c | 2 ++ src/tools/pg_bsd_indent/tests/declarations.0.stdout | 2 +- src/tools/pg_bsd_indent/tests/struct.0 | 2 ++ src/tools/pg_bsd_indent/tests/struct.0.stdout | 2 ++ src/tools/pgindent/pgindent | 2 +- 6 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/tools/pg_bsd_indent/args.c b/src/tools/pg_bsd_indent/args= .c index 5fa7e6b038c..763a03a23b5 100644 --- a/src/tools/pg_bsd_indent/args.c +++ b/src/tools/pg_bsd_indent/args.c @@ -51,7 +51,7 @@ static char sccsid[] =3D "@(#)args.c 8.1 (Berkeley) 6/6/= 93"; #include "indent_globs.h" #include "indent.h" = -#define INDENT_VERSION "2.1.2" +#define INDENT_VERSION "2.1.3" = /* profile types */ #define PRO_SPECIAL 1 /* special case */ diff --git a/src/tools/pg_bsd_indent/indent.c b/src/tools/pg_bsd_indent/in= dent.c index 736f350f145..1a29409173b 100644 --- a/src/tools/pg_bsd_indent/indent.c +++ b/src/tools/pg_bsd_indent/indent.c @@ -1013,6 +1013,8 @@ check_type: = case period: /* treat a period kind of like a binary * operation */ + if (ps.want_blank && ps.last_token =3D=3D comma) + *e_code++ =3D ' '; *e_code++ =3D '.'; /* move the period into line */ ps.want_blank =3D false; /* don't put a blank after a period */ break; diff --git a/src/tools/pg_bsd_indent/tests/declarations.0.stdout b/src/too= ls/pg_bsd_indent/tests/declarations.0.stdout index ab5a447a8bc..baa6bb55c78 100644 --- a/src/tools/pg_bsd_indent/tests/declarations.0.stdout +++ b/src/tools/pg_bsd_indent/tests/declarations.0.stdout @@ -54,7 +54,7 @@ int_create(void) static _attribute_printf(1, 2) void -print_error(const char *fmt,...) +print_error(const char *fmt, ...) { = } diff --git a/src/tools/pg_bsd_indent/tests/struct.0 b/src/tools/pg_bsd_ind= ent/tests/struct.0 index 83142bfb197..6f65e461331 100644 --- a/src/tools/pg_bsd_indent/tests/struct.0 +++ b/src/tools/pg_bsd_indent/tests/struct.0 @@ -19,3 +19,5 @@ void u(struct x a) { int b; struct y c =3D (struct y *)&a; } + +static struct foo f =3D { .a =3D 1,.b=3D2 }; diff --git a/src/tools/pg_bsd_indent/tests/struct.0.stdout b/src/tools/pg_= bsd_indent/tests/struct.0.stdout index 38613128654..69e321ca05f 100644 --- a/src/tools/pg_bsd_indent/tests/struct.0.stdout +++ b/src/tools/pg_bsd_indent/tests/struct.0.stdout @@ -21,3 +21,5 @@ u(struct x a) int b; struct y c =3D (struct y *)&a; } + +static struct foo f =3D {.a =3D 1, .b =3D 2}; diff --git a/src/tools/pgindent/pgindent b/src/tools/pgindent/pgindent index b2ec5e2914b..d035b53699b 100755 --- a/src/tools/pgindent/pgindent +++ b/src/tools/pgindent/pgindent @@ -35,7 +35,7 @@ my $bak_to_cleanup; END { unlink $bak_to_cleanup if defined $bak_to_cleanup; } = # Update for pg_bsd_indent version -my $INDENT_VERSION =3D "2.1.2"; +my $INDENT_VERSION =3D "2.1.3"; = # Our standard indent settings my $indent_opts =3D -- = 2.47.3 ------- =_aaaaaaaaaa0 Content-Type: text/x-diff; name="v6-0002-effects.patch.nocfbot"; charset="us-ascii" Content-ID: <664734.1778004581.3@sss.pgh.pa.us> Content-Description: v6-0002-effects.patch.nocfbot Content-Transfer-Encoding: quoted-printable diff --git a/contrib/dblink/dblink.c b/contrib/dblink/dblink.c index 9798cb535bc..d843eee7e97 100644 --- a/contrib/dblink/dblink.c +++ b/contrib/dblink/dblink.c @@ -124,7 +124,7 @@ static bool dblink_connstr_has_pw(const char *connstr)= ; static void dblink_security_check(PGconn *conn, const char *connname, const char *connstr); static void dblink_res_error(PGconn *conn, const char *conname, PGresult = *res, - bool fail, const char *fmt,...) pg_attribute_printf(5, 6); + bool fail, const char *fmt, ...) pg_attribute_printf(5, 6); static char *get_connect_string(const char *servername); static char *escape_param_str(const char *str); static void validate_pkattnums(Relation rel, @@ -2793,7 +2793,7 @@ dblink_connstr_check(const char *connstr) */ static void dblink_res_error(PGconn *conn, const char *conname, PGresult *res, - bool fail, const char *fmt,...) + bool fail, const char *fmt, ...) { int level; char *pg_diag_sqlstate =3D PQresultErrorField(res, PG_DIAG_SQLSTATE); diff --git a/contrib/fuzzystrmatch/dmetaphone.c b/contrib/fuzzystrmatch/dm= etaphone.c index 062667527c2..f94b4187e40 100644 --- a/contrib/fuzzystrmatch/dmetaphone.c +++ b/contrib/fuzzystrmatch/dmetaphone.c @@ -350,7 +350,7 @@ SetAt(metastring *s, int pos, char c) Caveats: the START value is 0 based */ static int -StringAt(metastring *s, int start, int length,...) +StringAt(metastring *s, int start, int length, ...) { char *test; char *pos; diff --git a/contrib/jsonb_plpython/jsonb_plpython.c b/contrib/jsonb_plpyt= hon/jsonb_plpython.c index c2c4ce37c08..4de75a04e76 100644 --- a/contrib/jsonb_plpython/jsonb_plpython.c +++ b/contrib/jsonb_plpython/jsonb_plpython.c @@ -16,7 +16,7 @@ PG_MODULE_MAGIC_EXT( typedef char *(*PLyObject_AsString_t) (PyObject *plrv); static PLyObject_AsString_t PLyObject_AsString_p; = -typedef void (*PLy_elog_impl_t) (int elevel, const char *fmt,...); +typedef void (*PLy_elog_impl_t) (int elevel, const char *fmt, ...); static PLy_elog_impl_t PLy_elog_impl_p; = /* diff --git a/contrib/pgcrypto/px.c b/contrib/pgcrypto/px.c index f08bc498ac8..32f62f3fc1b 100644 --- a/contrib/pgcrypto/px.c +++ b/contrib/pgcrypto/px.c @@ -147,7 +147,7 @@ px_set_debug_handler(void (*handler) (const char *)) } = void -px_debug(const char *fmt,...) +px_debug(const char *fmt, ...) { va_list ap; = diff --git a/contrib/pgcrypto/px.h b/contrib/pgcrypto/px.h index a09533a3582..440acf6a527 100644 --- a/contrib/pgcrypto/px.h +++ b/contrib/pgcrypto/px.h @@ -194,7 +194,7 @@ bool CheckFIPSMode(void); void CheckBuiltinCryptoMode(void); = #ifdef PX_DEBUG -void px_debug(const char *fmt,...) pg_attribute_printf(1, 2); +void px_debug(const char *fmt, ...) pg_attribute_printf(1, 2); #else #define px_debug(...) #endif diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/po= stgres_fdw.c index c42cb690c7b..3cb7133c218 100644 --- a/contrib/postgres_fdw/postgres_fdw.c +++ b/contrib/postgres_fdw/postgres_fdw.c @@ -5593,7 +5593,7 @@ postgresImportForeignStatistics(Relation relation, L= ist *va_cols, int elevel) const char *relname =3D NULL; ForeignTable *table; ForeignServer *server; - RemoteStatsResults remstats =3D {.rel =3D NULL,.att =3D NULL}; + RemoteStatsResults remstats =3D {.rel =3D NULL, .att =3D NULL}; RemoteAttributeMapping *remattrmap =3D NULL; int attrcnt =3D 0; bool restore_stats =3D false; diff --git a/src/backend/access/index/amvalidate.c b/src/backend/access/in= dex/amvalidate.c index f86ba7d76d2..96ef19e96ff 100644 --- a/src/backend/access/index/amvalidate.c +++ b/src/backend/access/index/amvalidate.c @@ -150,7 +150,7 @@ identify_opfamily_groups(CatCList *oprlist, CatCList *= proclist) */ bool check_amproc_signature(Oid funcid, Oid restype, bool exact, - int minargs, int maxargs,...) + int minargs, int maxargs, ...) { bool result =3D true; HeapTuple tp; diff --git a/src/backend/access/transam/xlogreader.c b/src/backend/access/= transam/xlogreader.c index 8849610db00..3145c58a9b1 100644 --- a/src/backend/access/transam/xlogreader.c +++ b/src/backend/access/transam/xlogreader.c @@ -41,7 +41,7 @@ #include "common/logging.h" #endif = -static void report_invalid_record(XLogReaderState *state, const char *fmt= ,...) +static void report_invalid_record(XLogReaderState *state, const char *fmt= , ...) pg_attribute_printf(2, 3); static void allocate_recordbuf(XLogReaderState *state, uint32 reclength); static int ReadPageInternal(XLogReaderState *state, XLogRecPtr pageptr, @@ -70,7 +70,7 @@ static void WALOpenSegmentInit(WALOpenSegment *seg, WALS= egmentContext *segcxt, * the current record being read. */ static void -report_invalid_record(XLogReaderState *state, const char *fmt,...) +report_invalid_record(XLogReaderState *state, const char *fmt, ...) { va_list args; = diff --git a/src/backend/backup/basebackup_incremental.c b/src/backend/bac= kup/basebackup_incremental.c index 6f3552c6a4a..9235f6b268c 100644 --- a/src/backend/backup/basebackup_incremental.c +++ b/src/backend/backup/basebackup_incremental.c @@ -140,7 +140,7 @@ static void manifest_process_wal_range(JsonManifestPar= seContext *context, XLogRecPtr start_lsn, XLogRecPtr end_lsn); pg_noreturn static void manifest_report_error(JsonManifestParseContext *c= ontext, - const char *fmt,...) + const char *fmt, ...) pg_attribute_printf(2, 3); static int compare_block_numbers(const void *a, const void *b); = @@ -1018,7 +1018,7 @@ manifest_process_wal_range(JsonManifestParseContext = *context, * manifest. */ static void -manifest_report_error(JsonManifestParseContext *context, const char *fmt,= ...) +manifest_report_error(JsonManifestParseContext *context, const char *fmt,= ...) { StringInfoData errbuf; = diff --git a/src/backend/backup/walsummary.c b/src/backend/backup/walsumma= ry.c index 4cd1824fbc6..0cdc86af30b 100644 --- a/src/backend/backup/walsummary.c +++ b/src/backend/backup/walsummary.c @@ -319,7 +319,7 @@ WriteWalSummary(void *wal_summary_io, void *data, int = length) * Error-reporting callback for use with CreateBlockRefTableReader. */ void -ReportWalSummaryError(void *callback_arg, char *fmt,...) +ReportWalSummaryError(void *callback_arg, char *fmt, ...) { StringInfoData buf; va_list ap; diff --git a/src/backend/lib/rbtree.c b/src/backend/lib/rbtree.c index d7b410d4430..036f3478062 100644 --- a/src/backend/lib/rbtree.c +++ b/src/backend/lib/rbtree.c @@ -62,7 +62,7 @@ struct RBTree = static RBTNode sentinel =3D { - .color =3D RBTBLACK,.left =3D RBTNIL,.right =3D RBTNIL,.parent =3D NULL + .color =3D RBTBLACK, .left =3D RBTNIL, .right =3D RBTNIL, .parent =3D NU= LL }; = = diff --git a/src/backend/utils/adt/ddlutils.c b/src/backend/utils/adt/ddlu= tils.c index d6f55c48f37..f32fcd453ef 100644 --- a/src/backend/utils/adt/ddlutils.c +++ b/src/backend/utils/adt/ddlutils.c @@ -76,7 +76,7 @@ typedef struct DdlOption static void parse_ddl_options(FunctionCallInfo fcinfo, int variadic_start= , DdlOption *opts, int nopts); static void append_ddl_option(StringInfo buf, bool pretty, int indent, - const char *fmt,...) + const char *fmt, ...) pg_attribute_printf(4, 5); static void append_guc_value(StringInfo buf, const char *name, const char *value); @@ -232,7 +232,7 @@ parse_ddl_options(FunctionCallInfo fcinfo, int variadi= c_start, */ static void append_ddl_option(StringInfo buf, bool pretty, int indent, - const char *fmt,...) + const char *fmt, ...) { if (pretty) { diff --git a/src/backend/utils/error/elog.c b/src/backend/utils/error/elog= .c index 1b8a73f589a..50c53b571a0 100644 --- a/src/backend/utils/error/elog.c +++ b/src/backend/utils/error/elog.c @@ -1091,7 +1091,7 @@ errcode_for_socket_access(void) * ereport will provide one for the output methods that need it. */ int -errmsg(const char *fmt,...) +errmsg(const char *fmt, ...) { ErrorData *edata =3D &errordata[errordata_stack_depth]; MemoryContext oldcontext; @@ -1346,7 +1346,7 @@ backtrace_cleanup(int code, Datum arg) * error recursion. */ int -errmsg_internal(const char *fmt,...) +errmsg_internal(const char *fmt, ...) { ErrorData *edata =3D &errordata[errordata_stack_depth]; MemoryContext oldcontext; @@ -1370,7 +1370,7 @@ errmsg_internal(const char *fmt,...) */ int errmsg_plural(const char *fmt_singular, const char *fmt_plural, - unsigned long n,...) + unsigned long n, ...) { ErrorData *edata =3D &errordata[errordata_stack_depth]; MemoryContext oldcontext; @@ -1392,7 +1392,7 @@ errmsg_plural(const char *fmt_singular, const char *= fmt_plural, * errdetail --- add a detail error message text to the current error */ int -errdetail(const char *fmt,...) +errdetail(const char *fmt, ...) { ErrorData *edata =3D &errordata[errordata_stack_depth]; MemoryContext oldcontext; @@ -1419,7 +1419,7 @@ errdetail(const char *fmt,...) * (typically, that they don't seem to be useful to average users). */ int -errdetail_internal(const char *fmt,...) +errdetail_internal(const char *fmt, ...) { ErrorData *edata =3D &errordata[errordata_stack_depth]; MemoryContext oldcontext; @@ -1440,7 +1440,7 @@ errdetail_internal(const char *fmt,...) * errdetail_log --- add a detail_log error message text to the current e= rror */ int -errdetail_log(const char *fmt,...) +errdetail_log(const char *fmt, ...) { ErrorData *edata =3D &errordata[errordata_stack_depth]; MemoryContext oldcontext; @@ -1462,7 +1462,7 @@ errdetail_log(const char *fmt,...) */ int errdetail_log_plural(const char *fmt_singular, const char *fmt_plural, - unsigned long n,...) + unsigned long n, ...) { ErrorData *edata =3D &errordata[errordata_stack_depth]; MemoryContext oldcontext; @@ -1485,7 +1485,7 @@ errdetail_log_plural(const char *fmt_singular, const= char *fmt_plural, */ int errdetail_plural(const char *fmt_singular, const char *fmt_plural, - unsigned long n,...) + unsigned long n, ...) { ErrorData *edata =3D &errordata[errordata_stack_depth]; MemoryContext oldcontext; @@ -1506,7 +1506,7 @@ errdetail_plural(const char *fmt_singular, const cha= r *fmt_plural, * errhint --- add a hint error message text to the current error */ int -errhint(const char *fmt,...) +errhint(const char *fmt, ...) { ErrorData *edata =3D &errordata[errordata_stack_depth]; MemoryContext oldcontext; @@ -1528,7 +1528,7 @@ errhint(const char *fmt,...) * Non-translated version of errhint(), see also errmsg_internal(). */ int -errhint_internal(const char *fmt,...) +errhint_internal(const char *fmt, ...) { ErrorData *edata =3D &errordata[errordata_stack_depth]; MemoryContext oldcontext; @@ -1550,7 +1550,7 @@ errhint_internal(const char *fmt,...) */ int errhint_plural(const char *fmt_singular, const char *fmt_plural, - unsigned long n,...) + unsigned long n, ...) { ErrorData *edata =3D &errordata[errordata_stack_depth]; MemoryContext oldcontext; @@ -1575,7 +1575,7 @@ errhint_plural(const char *fmt_singular, const char = *fmt_plural, * states. */ int -errcontext_msg(const char *fmt,...) +errcontext_msg(const char *fmt, ...) { ErrorData *edata =3D &errordata[errordata_stack_depth]; MemoryContext oldcontext; @@ -1847,7 +1847,7 @@ pre_format_elog_string(int errnumber, const char *do= main) } = char * -format_elog_string(const char *fmt,...) +format_elog_string(const char *fmt, ...) { ErrorData errdata; ErrorData *edata; @@ -4226,7 +4226,7 @@ append_with_tabs(StringInfo buf, const char *str) * safely (memory context, GUC load etc) */ void -write_stderr(const char *fmt,...) +write_stderr(const char *fmt, ...) { va_list ap; = diff --git a/src/backend/utils/error/jsonlog.c b/src/backend/utils/error/j= sonlog.c index 2ff6a004046..e5ba22794d2 100644 --- a/src/backend/utils/error/jsonlog.c +++ b/src/backend/utils/error/jsonlog.c @@ -30,7 +30,7 @@ = static void appendJSONKeyValueFmt(StringInfo buf, const char *key, bool escape_key, - const char *fmt,...) pg_attribute_printf(4, 5); + const char *fmt, ...) pg_attribute_printf(4, 5); = /* * appendJSONKeyValue @@ -68,7 +68,7 @@ appendJSONKeyValue(StringInfo buf, const char *key, cons= t char *value, */ static void appendJSONKeyValueFmt(StringInfo buf, const char *key, - bool escape_key, const char *fmt,...) + bool escape_key, const char *fmt, ...) { int save_errno =3D errno; size_t len =3D 128; /* initial assumption about buffer size */ diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index c4c3fbc4fe3..774bbc9be5f 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -261,7 +261,7 @@ static bool valid_custom_variable_name(const char *nam= e); static bool assignable_custom_variable_name(const char *name, bool skip_e= rrors, int elevel); static void do_serialize(char **destptr, Size *maxbytes, - const char *fmt,...) pg_attribute_printf(3, 4); + const char *fmt, ...) pg_attribute_printf(3, 4); static bool call_bool_check_hook(const struct config_generic *conf, bool = *newval, void **extra, GucSource source, int elevel); static bool call_int_check_hook(const struct config_generic *conf, int *n= ewval, @@ -5883,7 +5883,7 @@ EstimateGUCStateSpace(void) * maxbytes is not sufficient to copy the string, error out. */ static void -do_serialize(char **destptr, Size *maxbytes, const char *fmt,...) +do_serialize(char **destptr, Size *maxbytes, const char *fmt, ...) { va_list vargs; int n; diff --git a/src/bin/pg_combinebackup/load_manifest.c b/src/bin/pg_combine= backup/load_manifest.c index 2e50b7af4d2..021fd3ffa1d 100644 --- a/src/bin/pg_combinebackup/load_manifest.c +++ b/src/bin/pg_combinebackup/load_manifest.c @@ -69,7 +69,7 @@ static void combinebackup_per_wal_range_cb(JsonManifestP= arseContext *context, XLogRecPtr start_lsn, XLogRecPtr end_lsn); pg_noreturn static void report_manifest_error(JsonManifestParseContext *c= ontext, - const char *fmt,...) + const char *fmt, ...) pg_attribute_printf(2, 3); = /* @@ -225,7 +225,7 @@ load_backup_manifest(char *backup_directory) * expects this function not to return. */ static void -report_manifest_error(JsonManifestParseContext *context, const char *fmt,= ...) +report_manifest_error(JsonManifestParseContext *context, const char *fmt,= ...) { va_list ap; = diff --git a/src/bin/pg_ctl/pg_ctl.c b/src/bin/pg_ctl/pg_ctl.c index 5539eb8ebef..b5433a75d12 100644 --- a/src/bin/pg_ctl/pg_ctl.c +++ b/src/bin/pg_ctl/pg_ctl.c @@ -114,7 +114,7 @@ static HANDLE shutdownHandles[2]; #endif = = -static void write_stderr(const char *fmt,...) pg_attribute_printf(1, 2); +static void write_stderr(const char *fmt, ...) pg_attribute_printf(1, 2); static void do_advice(void); static void do_help(void); static void set_mode(char *modeopt); @@ -200,7 +200,7 @@ write_eventlog(int level, const char *line) * not available). */ static void -write_stderr(const char *fmt,...) +write_stderr(const char *fmt, ...) { va_list ap; = diff --git a/src/bin/pg_dump/filter.c b/src/bin/pg_dump/filter.c index fbff69d4f7e..8aa3810cb08 100644 --- a/src/bin/pg_dump/filter.c +++ b/src/bin/pg_dump/filter.c @@ -151,7 +151,7 @@ get_object_type(const char *keyword, int size, FilterO= bjectType *objtype) = = void -pg_log_filter_error(FilterStateData *fstate, const char *fmt,...) +pg_log_filter_error(FilterStateData *fstate, const char *fmt, ...) { va_list argp; char buf[256]; diff --git a/src/bin/pg_dump/filter.h b/src/bin/pg_dump/filter.h index b87cd6dec58..0cf0d22d159 100644 --- a/src/bin/pg_dump/filter.h +++ b/src/bin/pg_dump/filter.h @@ -63,7 +63,7 @@ typedef enum extern const char *filter_object_type_name(FilterObjectType fot); extern void filter_init(FilterStateData *fstate, const char *filename, ex= it_function f_exit); extern void filter_free(FilterStateData *fstate); -extern void pg_log_filter_error(FilterStateData *fstate, const char *fmt,= ...) +extern void pg_log_filter_error(FilterStateData *fstate, const char *fmt,= ...) pg_attribute_printf(2, 3); extern bool filter_read_item(FilterStateData *fstate, char **objname, FilterCommandType *comtype, FilterObjectType *objtype); diff --git a/src/bin/pg_dump/pg_backup.h b/src/bin/pg_dump/pg_backup.h index fda912ba0a9..28e7ff6fa16 100644 --- a/src/bin/pg_dump/pg_backup.h +++ b/src/bin/pg_dump/pg_backup.h @@ -339,7 +339,7 @@ extern void SortTocFromFile(Archive *AHX); = /* Convenience functions used only when writing DATA */ extern void archputs(const char *s, Archive *AH); -extern int archprintf(Archive *AH, const char *fmt,...) pg_attribute_prin= tf(2, 3); +extern int archprintf(Archive *AH, const char *fmt, ...) pg_attribute_pri= ntf(2, 3); = #define appendStringLiteralAH(buf,str,AH) \ appendStringLiteral(buf, str, (AH)->encoding, (AH)->std_strings) diff --git a/src/bin/pg_dump/pg_backup_archiver.c b/src/bin/pg_dump/pg_bac= kup_archiver.c index fecf6f2d1ce..2fd773ad84f 100644 --- a/src/bin/pg_dump/pg_backup_archiver.c +++ b/src/bin/pg_dump/pg_backup_archiver.c @@ -1674,7 +1674,7 @@ archputs(const char *s, Archive *AH) = /* Public */ int -archprintf(Archive *AH, const char *fmt,...) +archprintf(Archive *AH, const char *fmt, ...) { int save_errno =3D errno; char *p; @@ -1778,7 +1778,7 @@ RestoreOutput(ArchiveHandle *AH, CompressFileHandle = *savedOutput) * Print formatted text to the output file (usually stdout). */ int -ahprintf(ArchiveHandle *AH, const char *fmt,...) +ahprintf(ArchiveHandle *AH, const char *fmt, ...) { int save_errno =3D errno; char *p; @@ -1916,7 +1916,7 @@ ahwrite(const void *ptr, size_t size, size_t nmemb, = ArchiveHandle *AH) = /* on some error, we may decide to go on... */ void -warn_or_exit_horribly(ArchiveHandle *AH, const char *fmt,...) +warn_or_exit_horribly(ArchiveHandle *AH, const char *fmt, ...) { va_list ap; = diff --git a/src/bin/pg_dump/pg_backup_archiver.h b/src/bin/pg_dump/pg_bac= kup_archiver.h index 9c3aca6543a..1218bf6a6a1 100644 --- a/src/bin/pg_dump/pg_backup_archiver.h +++ b/src/bin/pg_dump/pg_backup_archiver.h @@ -396,7 +396,7 @@ extern int parallel_restore(ArchiveHandle *AH, TocEntr= y *te); extern void on_exit_close_archive(Archive *AHX); extern void replace_on_exit_close_archive(Archive *AHX); = -extern void warn_or_exit_horribly(ArchiveHandle *AH, const char *fmt,...)= pg_attribute_printf(2, 3); +extern void warn_or_exit_horribly(ArchiveHandle *AH, const char *fmt, ...= ) pg_attribute_printf(2, 3); = /* Options for ArchiveEntry */ typedef struct _archiveOpts @@ -472,6 +472,6 @@ extern void IssueACLPerBlob(ArchiveHandle *AH, TocEntr= y *te); extern void DropLOIfExists(ArchiveHandle *AH, Oid oid); = void ahwrite(const void *ptr, size_t size, size_t nmemb, ArchiveHandle *= AH); -int ahprintf(ArchiveHandle *AH, const char *fmt,...) pg_attribute_print= f(2, 3); +int ahprintf(ArchiveHandle *AH, const char *fmt, ...) pg_attribute_prin= tf(2, 3); = #endif diff --git a/src/bin/pg_dump/pg_backup_tar.c b/src/bin/pg_dump/pg_backup_t= ar.c index a3879410c94..e6abf20df11 100644 --- a/src/bin/pg_dump/pg_backup_tar.c +++ b/src/bin/pg_dump/pg_backup_tar.c @@ -102,7 +102,7 @@ static void tarClose(ArchiveHandle *AH, TAR_MEMBER *th= ); #ifdef __NOT_USED__ static char *tarGets(char *buf, size_t len, TAR_MEMBER *th); #endif -static int tarPrintf(TAR_MEMBER *th, const char *fmt,...) pg_attribute_pr= intf(2, 3); +static int tarPrintf(TAR_MEMBER *th, const char *fmt, ...) pg_attribute_p= rintf(2, 3); = static void _tarAddFile(ArchiveHandle *AH, TAR_MEMBER *th); static TAR_MEMBER *_tarPositionTo(ArchiveHandle *AH, const char *filename= ); @@ -951,7 +951,7 @@ _EndLOs(ArchiveHandle *AH, TocEntry *te) */ = static int -tarPrintf(TAR_MEMBER *th, const char *fmt,...) +tarPrintf(TAR_MEMBER *th, const char *fmt, ...) { int save_errno =3D errno; char *p; diff --git a/src/bin/pg_upgrade/exec.c b/src/bin/pg_upgrade/exec.c index e1de61f36ee..563b4a6b5fa 100644 --- a/src/bin/pg_upgrade/exec.c +++ b/src/bin/pg_upgrade/exec.c @@ -84,7 +84,7 @@ get_bin_version(ClusterInfo *cluster) */ bool exec_prog(const char *log_filename, const char *opt_log_file, - bool report_error, bool exit_on_error, const char *fmt,...) + bool report_error, bool exit_on_error, const char *fmt, ...) { int result =3D 0; int written; diff --git a/src/bin/pg_upgrade/parallel.c b/src/bin/pg_upgrade/parallel.c index f0406de84ee..f57dbbbb853 100644 --- a/src/bin/pg_upgrade/parallel.c +++ b/src/bin/pg_upgrade/parallel.c @@ -61,7 +61,7 @@ DWORD win32_transfer_all_new_dbs(transfer_thread_arg *a= rgs); */ void parallel_exec_prog(const char *log_file, const char *opt_log_file, - const char *fmt,...) + const char *fmt, ...) { va_list args; char cmd[MAX_STRING]; diff --git a/src/bin/pg_upgrade/pg_upgrade.h b/src/bin/pg_upgrade/pg_upgra= de.h index 1d767bbda2d..330818c8eb0 100644 --- a/src/bin/pg_upgrade/pg_upgrade.h +++ b/src/bin/pg_upgrade/pg_upgrade.h @@ -414,7 +414,7 @@ void generate_old_dump(void); #define EXEC_PSQL_ARGS "--echo-queries --set ON_ERROR_STOP=3Don --no-psql= rc --dbname=3Dtemplate1" = bool exec_prog(const char *log_filename, const char *opt_log_file, - bool report_error, bool exit_on_error, const char *fmt,...) pg_att= ribute_printf(5, 6); + bool report_error, bool exit_on_error, const char *fmt, ...) pg_at= tribute_printf(5, 6); void verify_directories(void); bool pid_lock_file_exists(const char *datadir); = @@ -474,7 +474,7 @@ void init_tablespaces(void); /* server.c */ = PGconn *connectToServer(ClusterInfo *cluster, const char *db_name); -PGresult *executeQueryOrDie(PGconn *conn, const char *fmt,...) pg_attri= bute_printf(2, 3); +PGresult *executeQueryOrDie(PGconn *conn, const char *fmt, ...) pg_attr= ibute_printf(2, 3); = char *cluster_conn_opts(ClusterInfo *cluster); = @@ -488,13 +488,13 @@ void check_pghost_envvar(void); char *quote_identifier(const char *s); int get_user_info(char **user_name_p); void check_ok(void); -void report_status(eLogType type, const char *fmt,...) pg_attribute_prin= tf(2, 3); -void pg_log(eLogType type, const char *fmt,...) pg_attribute_printf(2, 3= ); -pg_noreturn void pg_fatal(const char *fmt,...) pg_attribute_printf(1, 2); +void report_status(eLogType type, const char *fmt, ...) pg_attribute_pri= ntf(2, 3); +void pg_log(eLogType type, const char *fmt, ...) pg_attribute_printf(2, = 3); +pg_noreturn void pg_fatal(const char *fmt, ...) pg_attribute_printf(1, 2)= ; void end_progress_output(void); void cleanup_output_dirs(void); -void prep_status(const char *fmt,...) pg_attribute_printf(1, 2); -void prep_status_progress(const char *fmt,...) pg_attribute_printf(1, 2)= ; +void prep_status(const char *fmt, ...) pg_attribute_printf(1, 2); +void prep_status_progress(const char *fmt, ...) pg_attribute_printf(1, 2= ); unsigned int str2uint(const char *str); = = @@ -512,7 +512,7 @@ MultiXactOffset rewrite_multixacts(MultiXactId from_mu= lti, MultiXactId to_multi) = /* parallel.c */ void parallel_exec_prog(const char *log_file, const char *opt_log_file, - const char *fmt,...) pg_attribute_printf(3, 4); + const char *fmt, ...) pg_attribute_printf(3, 4); void parallel_transfer_all_new_dbs(DbInfoArr *old_db_arr, DbInfoArr *new= _db_arr, char *old_pgdata, char *new_pgdata, char *old_tablespace, char *new_tablespace); diff --git a/src/bin/pg_upgrade/server.c b/src/bin/pg_upgrade/server.c index 1eb8bc97c05..5d81e4e95b8 100644 --- a/src/bin/pg_upgrade/server.c +++ b/src/bin/pg_upgrade/server.c @@ -121,7 +121,7 @@ cluster_conn_opts(ClusterInfo *cluster) * message and calls exit() to kill the program. */ PGresult * -executeQueryOrDie(PGconn *conn, const char *fmt,...) +executeQueryOrDie(PGconn *conn, const char *fmt, ...) { static char query[QUERY_ALLOC]; va_list args; diff --git a/src/bin/pg_upgrade/util.c b/src/bin/pg_upgrade/util.c index 0f47ed771d5..08d6385b512 100644 --- a/src/bin/pg_upgrade/util.c +++ b/src/bin/pg_upgrade/util.c @@ -29,7 +29,7 @@ static void pg_log_v(eLogType type, const char *fmt, va_= list ap) pg_attribute_pr * results and other messages. */ void -report_status(eLogType type, const char *fmt,...) +report_status(eLogType type, const char *fmt, ...) { va_list args; = @@ -126,7 +126,7 @@ cleanup_output_dirs(void) * pg_log(PG_FATAL, "failed: %s", message); */ void -prep_status(const char *fmt,...) +prep_status(const char *fmt, ...) { va_list args; char message[MAX_STRING]; @@ -153,7 +153,7 @@ prep_status(const char *fmt,...) * report_status(PG_REPORT, "ok"); */ void -prep_status_progress(const char *fmt,...) +prep_status_progress(const char *fmt, ...) { va_list args; char message[MAX_STRING]; @@ -256,7 +256,7 @@ pg_log_v(eLogType type, const char *fmt, va_list ap) = = void -pg_log(eLogType type, const char *fmt,...) +pg_log(eLogType type, const char *fmt, ...) { va_list args; = @@ -267,7 +267,7 @@ pg_log(eLogType type, const char *fmt,...) = = void -pg_fatal(const char *fmt,...) +pg_fatal(const char *fmt, ...) { va_list args; = diff --git a/src/bin/pg_verifybackup/pg_verifybackup.c b/src/bin/pg_verify= backup/pg_verifybackup.c index b60ab8739d5..bd9883244d7 100644 --- a/src/bin/pg_verifybackup/pg_verifybackup.c +++ b/src/bin/pg_verifybackup/pg_verifybackup.c @@ -71,7 +71,7 @@ static void verifybackup_per_wal_range_cb(JsonManifestPa= rseContext *context, XLogRecPtr start_lsn, XLogRecPtr end_lsn); pg_noreturn static void report_manifest_error(JsonManifestParseContext *c= ontext, - const char *fmt,...) + const char *fmt, ...) pg_attribute_printf(2, 3); = static void verify_tar_backup(verifier_context *context, DIR *dir, @@ -521,7 +521,7 @@ parse_manifest_file(char *manifest_path) * expects this function not to return. */ static void -report_manifest_error(JsonManifestParseContext *context, const char *fmt,= ...) +report_manifest_error(JsonManifestParseContext *context, const char *fmt,= ...) { va_list ap; = @@ -1250,7 +1250,7 @@ parse_required_wal(verifier_context *context, char *= pg_waldump_path, * context says we should. */ void -report_backup_error(verifier_context *context, const char *pg_restrict fm= t,...) +report_backup_error(verifier_context *context, const char *pg_restrict fm= t, ...) { va_list ap; = @@ -1267,7 +1267,7 @@ report_backup_error(verifier_context *context, const= char *pg_restrict fmt,...) * Report a fatal error and exit */ void -report_fatal_error(const char *pg_restrict fmt,...) +report_fatal_error(const char *pg_restrict fmt, ...) { va_list ap; = diff --git a/src/bin/pg_verifybackup/pg_verifybackup.h b/src/bin/pg_verify= backup/pg_verifybackup.h index a99d9bfd581..8572c1433dc 100644 --- a/src/bin/pg_verifybackup/pg_verifybackup.h +++ b/src/bin/pg_verifybackup/pg_verifybackup.h @@ -96,9 +96,9 @@ typedef struct verifier_context } verifier_context; = extern void report_backup_error(verifier_context *context, - const char *pg_restrict fmt,...) + const char *pg_restrict fmt, ...) pg_attribute_printf(2, 3); -pg_noreturn extern void report_fatal_error(const char *pg_restrict fmt,..= .) +pg_noreturn extern void report_fatal_error(const char *pg_restrict fmt, .= ..) pg_attribute_printf(1, 2); extern bool should_ignore_relpath(verifier_context *context, const char *relpath); diff --git a/src/bin/pg_walsummary/pg_walsummary.c b/src/bin/pg_walsummary= /pg_walsummary.c index aa214b8616d..c3e98ffe55e 100644 --- a/src/bin/pg_walsummary/pg_walsummary.c +++ b/src/bin/pg_walsummary/pg_walsummary.c @@ -43,7 +43,7 @@ static void help(const char *progname); static int compare_block_numbers(const void *a, const void *b); static int walsummary_read_callback(void *callback_arg, void *data, int length); -static void walsummary_error_callback(void *callback_arg, char *fmt,...) = pg_attribute_printf(2, 3); +static void walsummary_error_callback(void *callback_arg, char *fmt, ...)= pg_attribute_printf(2, 3); = /* * Main program. @@ -227,7 +227,7 @@ compare_block_numbers(const void *a, const void *b) * Error callback. */ void -walsummary_error_callback(void *callback_arg, char *fmt,...) +walsummary_error_callback(void *callback_arg, char *fmt, ...) { va_list ap; = diff --git a/src/bin/psql/large_obj.c b/src/bin/psql/large_obj.c index 021f78e0f78..c961300fe98 100644 --- a/src/bin/psql/large_obj.c +++ b/src/bin/psql/large_obj.c @@ -13,10 +13,10 @@ #include "large_obj.h" #include "settings.h" = -static void print_lo_result(const char *fmt,...) pg_attribute_printf(1, 2= ); +static void print_lo_result(const char *fmt, ...) pg_attribute_printf(1, = 2); = static void -print_lo_result(const char *fmt,...) +print_lo_result(const char *fmt, ...) { va_list ap; = diff --git a/src/bin/psql/tab-complete.in.c b/src/bin/psql/tab-complete.in= .c index db65d130fcb..60c558edefc 100644 --- a/src/bin/psql/tab-complete.in.c +++ b/src/bin/psql/tab-complete.in.c @@ -1689,7 +1689,7 @@ TailMatchesArray(bool case_sensitive, static bool TailMatchesImpl(bool case_sensitive, int previous_words_count, char **previous_words, - int narg,...) + int narg, ...) { const char *argarray[64]; va_list args; @@ -1739,7 +1739,7 @@ HeadMatchesArray(bool case_sensitive, static bool HeadMatchesImpl(bool case_sensitive, int previous_words_count, char **previous_words, - int narg,...) + int narg, ...) { const char *argarray[64]; va_list args; @@ -1826,7 +1826,7 @@ MatchesArray(bool case_sensitive, static bool MatchesImpl(bool case_sensitive, int previous_words_count, char **previous_words, - int narg,...) + int narg, ...) { const char *argarray[64]; va_list args; diff --git a/src/common/logging.c b/src/common/logging.c index 4a69d96281b..648f2c1d6f1 100644 --- a/src/common/logging.c +++ b/src/common/logging.c @@ -220,7 +220,7 @@ pg_logging_unset_logfile(void) = void pg_log_generic(enum pg_log_level level, enum pg_log_part part, - const char *pg_restrict fmt,...) + const char *pg_restrict fmt, ...) { va_list ap; = diff --git a/src/common/percentrepl.c b/src/common/percentrepl.c index 525a5ba6cf0..70bbfabd117 100644 --- a/src/common/percentrepl.c +++ b/src/common/percentrepl.c @@ -56,7 +56,7 @@ * revised. */ char * -replace_percent_placeholders(const char *instr, const char *param_name, c= onst char *letters,...) +replace_percent_placeholders(const char *instr, const char *param_name, c= onst char *letters, ...) { StringInfoData result; = diff --git a/src/common/psprintf.c b/src/common/psprintf.c index 6f006e0262f..29b09732a5a 100644 --- a/src/common/psprintf.c +++ b/src/common/psprintf.c @@ -40,7 +40,7 @@ * One should therefore think twice about using this in libpq. */ char * -psprintf(const char *fmt,...) +psprintf(const char *fmt, ...) { int save_errno =3D errno; size_t len =3D 128; /* initial assumption about buffer size */ diff --git a/src/common/stringinfo.c b/src/common/stringinfo.c index ae39540e468..468954e484e 100644 --- a/src/common/stringinfo.c +++ b/src/common/stringinfo.c @@ -142,7 +142,7 @@ resetStringInfo(StringInfo str) * strcat. */ void -appendStringInfo(StringInfo str, const char *fmt,...) +appendStringInfo(StringInfo str, const char *fmt, ...) { int save_errno =3D errno; = diff --git a/src/fe_utils/option_utils.c b/src/fe_utils/option_utils.c index 8d0659c1164..c8bba075c1f 100644 --- a/src/fe_utils/option_utils.c +++ b/src/fe_utils/option_utils.c @@ -122,7 +122,7 @@ parse_sync_method(const char *optarg, DataDirSyncMetho= d *sync_method) * parameter (it discovers the number of arguments automagically). */ void -check_mut_excl_opts_internal(int n,...) +check_mut_excl_opts_internal(int n, ...) { char *first =3D NULL; va_list args; diff --git a/src/include/access/amvalidate.h b/src/include/access/amvalida= te.h index b82998778ac..debd1ed37a4 100644 --- a/src/include/access/amvalidate.h +++ b/src/include/access/amvalidate.h @@ -29,7 +29,7 @@ typedef struct OpFamilyOpFuncGroup /* Functions in access/index/amvalidate.c */ extern List *identify_opfamily_groups(CatCList *oprlist, CatCList *procli= st); extern bool check_amproc_signature(Oid funcid, Oid restype, bool exact, - int minargs, int maxargs,...); + int minargs, int maxargs, ...); extern bool check_amoptsproc_signature(Oid funcid); extern bool check_amop_signature(Oid opno, Oid restype, Oid lefttype, Oid righttype); diff --git a/src/include/backup/walsummary.h b/src/include/backup/walsumma= ry.h index 60157e0ac50..093b42df473 100644 --- a/src/include/backup/walsummary.h +++ b/src/include/backup/walsummary.h @@ -44,6 +44,6 @@ extern void RemoveWalSummaryIfOlderThan(WalSummaryFile *= ws, = extern int ReadWalSummary(void *wal_summary_io, void *data, int length); extern int WriteWalSummary(void *wal_summary_io, void *data, int length); -extern void ReportWalSummaryError(void *callback_arg, char *fmt,...) pg_a= ttribute_printf(2, 3); +extern void ReportWalSummaryError(void *callback_arg, char *fmt, ...) pg_= attribute_printf(2, 3); = #endif /* WALSUMMARY_H */ diff --git a/src/include/common/blkreftable.h b/src/include/common/blkreft= able.h index b5b5517f660..42b11b0a2b1 100644 --- a/src/include/common/blkreftable.h +++ b/src/include/common/blkreftable.h @@ -44,7 +44,7 @@ typedef struct BlockRefTableWriter BlockRefTableWriter; * report_error_fn should not return. */ typedef int (*io_callback_fn) (void *callback_arg, void *data, int length= ); -typedef void (*report_error_fn) (void *callback_arg, char *msg,...) pg_at= tribute_printf(2, 3); +typedef void (*report_error_fn) (void *callback_arg, char *msg, ...) pg_a= ttribute_printf(2, 3); = = /* diff --git a/src/include/common/fe_memutils.h b/src/include/common/fe_memu= tils.h index eccdfcab086..b786eaf48b0 100644 --- a/src/include/common/fe_memutils.h +++ b/src/include/common/fe_memutils.h @@ -79,7 +79,7 @@ extern void pfree(void *pointer); #define repalloc_array(pointer, type, count) ((type *) repalloc(pointer, = sizeof(type) * (count))) = /* sprintf into a palloc'd buffer --- these are in psprintf.c */ -extern char *psprintf(const char *fmt,...) pg_attribute_printf(1, 2); +extern char *psprintf(const char *fmt, ...) pg_attribute_printf(1, 2); extern size_t pvsnprintf(char *buf, size_t len, const char *fmt, va_list = args) pg_attribute_printf(3, 0); = #endif /* FE_MEMUTILS_H */ diff --git a/src/include/common/logging.h b/src/include/common/logging.h index 06c202dbe2d..da62b14b2e3 100644 --- a/src/include/common/logging.h +++ b/src/include/common/logging.h @@ -95,7 +95,7 @@ void pg_logging_set_logfile(FILE *logfile); void pg_logging_unset_logfile(void); = void pg_log_generic(enum pg_log_level level, enum pg_log_part part, - const char *pg_restrict fmt,...) + const char *pg_restrict fmt, ...) pg_attribute_printf(3, 4); void pg_log_generic_v(enum pg_log_level level, enum pg_log_part part, const char *pg_restrict fmt, va_list ap) diff --git a/src/include/common/parse_manifest.h b/src/include/common/pars= e_manifest.h index 35a3b5ca66c..95ba885afe6 100644 --- a/src/include/common/parse_manifest.h +++ b/src/include/common/parse_manifest.h @@ -34,7 +34,7 @@ typedef void (*json_manifest_per_wal_range_callback) (Js= onManifestParseContext * TimeLineID tli, XLogRecPtr start_lsn, XLogRecPtr end_lsn); typedef void (*json_manifest_error_callback) (JsonManifestParseContext *, - const char *fmt,...) pg_attribute_printf(2, 3); + const char *fmt, ...) pg_attribute_printf(2, 3); = struct JsonManifestParseContext { diff --git a/src/include/common/percentrepl.h b/src/include/common/percent= repl.h index 9c0322dd446..9e7727f63a2 100644 --- a/src/include/common/percentrepl.h +++ b/src/include/common/percentrepl.h @@ -13,6 +13,6 @@ #ifndef PERCENTREPL_H #define PERCENTREPL_H = -extern char *replace_percent_placeholders(const char *instr, const char *= param_name, const char *letters,...); +extern char *replace_percent_placeholders(const char *instr, const char *= param_name, const char *letters, ...); = #endif /* PERCENTREPL_H */ diff --git a/src/include/fe_utils/option_utils.h b/src/include/fe_utils/op= tion_utils.h index d975db77af2..f70b6159099 100644 --- a/src/include/fe_utils/option_utils.h +++ b/src/include/fe_utils/option_utils.h @@ -24,7 +24,7 @@ extern bool option_parse_int(const char *optarg, const c= har *optname, int *result); extern bool parse_sync_method(const char *optarg, DataDirSyncMethod *sync_method); -extern void check_mut_excl_opts_internal(int n,...); +extern void check_mut_excl_opts_internal(int n, ...); = /* see comment for check_mut_excl_opts_internal() in option_utils.c for i= nfo */ #define check_mut_excl_opts(set, opt, ...) \ diff --git a/src/include/jit/llvmjit_emit.h b/src/include/jit/llvmjit_emit= .h index 089945391ee..0e089b9569b 100644 --- a/src/include/jit/llvmjit_emit.h +++ b/src/include/jit/llvmjit_emit.h @@ -159,14 +159,14 @@ l_load_gep1(LLVMBuilderRef b, LLVMTypeRef t, LLVMVal= ueRef v, LLVMValueRef idx, c } = /* separate, because pg_attribute_printf(2, 3) can't appear in definition= */ -static inline LLVMBasicBlockRef l_bb_before_v(LLVMBasicBlockRef r, const = char *fmt,...) pg_attribute_printf(2, 3); +static inline LLVMBasicBlockRef l_bb_before_v(LLVMBasicBlockRef r, const = char *fmt, ...) pg_attribute_printf(2, 3); = /* * Insert a new basic block, just before r, the name being determined by = fmt * and arguments. */ static inline LLVMBasicBlockRef -l_bb_before_v(LLVMBasicBlockRef r, const char *fmt,...) +l_bb_before_v(LLVMBasicBlockRef r, const char *fmt, ...) { char buf[512]; va_list args; @@ -182,14 +182,14 @@ l_bb_before_v(LLVMBasicBlockRef r, const char *fmt,.= ..) } = /* separate, because pg_attribute_printf(2, 3) can't appear in definition= */ -static inline LLVMBasicBlockRef l_bb_append_v(LLVMValueRef f, const char = *fmt,...) pg_attribute_printf(2, 3); +static inline LLVMBasicBlockRef l_bb_append_v(LLVMValueRef f, const char = *fmt, ...) pg_attribute_printf(2, 3); = /* * Insert a new basic block after previous basic blocks, the name being * determined by fmt and arguments. */ static inline LLVMBasicBlockRef -l_bb_append_v(LLVMValueRef f, const char *fmt,...) +l_bb_append_v(LLVMValueRef f, const char *fmt, ...) { char buf[512]; va_list args; diff --git a/src/include/lib/stringinfo.h b/src/include/lib/stringinfo.h index 079652c8ce4..e3f4b922300 100644 --- a/src/include/lib/stringinfo.h +++ b/src/include/lib/stringinfo.h @@ -196,7 +196,7 @@ extern void resetStringInfo(StringInfo str); * to str if necessary. This is sort of like a combination of sprintf an= d * strcat. */ -extern void appendStringInfo(StringInfo str, const char *fmt,...) pg_attr= ibute_printf(2, 3); +extern void appendStringInfo(StringInfo str, const char *fmt, ...) pg_att= ribute_printf(2, 3); = /*------------------------ * appendStringInfoVA diff --git a/src/include/port.h b/src/include/port.h index c029878c6be..b18ccd7f8d4 100644 --- a/src/include/port.h +++ b/src/include/port.h @@ -231,13 +231,13 @@ pg_ascii_tolower(unsigned char ch) #endif = extern int pg_vsnprintf(char *str, size_t count, const char *fmt, va_list= args) pg_attribute_printf(3, 0); -extern int pg_snprintf(char *str, size_t count, const char *fmt,...) pg_a= ttribute_printf(3, 4); +extern int pg_snprintf(char *str, size_t count, const char *fmt, ...) pg_= attribute_printf(3, 4); extern int pg_vsprintf(char *str, const char *fmt, va_list args) pg_attri= bute_printf(2, 0); -extern int pg_sprintf(char *str, const char *fmt,...) pg_attribute_printf= (2, 3); +extern int pg_sprintf(char *str, const char *fmt, ...) pg_attribute_print= f(2, 3); extern int pg_vfprintf(FILE *stream, const char *fmt, va_list args) pg_at= tribute_printf(2, 0); -extern int pg_fprintf(FILE *stream, const char *fmt,...) pg_attribute_pri= ntf(2, 3); +extern int pg_fprintf(FILE *stream, const char *fmt, ...) pg_attribute_pr= intf(2, 3); extern int pg_vprintf(const char *fmt, va_list args) pg_attribute_printf(= 1, 0); -extern int pg_printf(const char *fmt,...) pg_attribute_printf(1, 2); +extern int pg_printf(const char *fmt, ...) pg_attribute_printf(1, 2); = #ifndef WIN32 /* @@ -360,7 +360,7 @@ extern bool rmtree(const char *path, bool rmtopdir); * passing of other special options. */ extern HANDLE pgwin32_open_handle(const char *, int, bool); -extern int pgwin32_open(const char *, int,...); +extern int pgwin32_open(const char *, int, ...); extern FILE *pgwin32_fopen(const char *, const char *); #define open(a,b,c) pgwin32_open(a,b,c) #define fopen(a,b) pgwin32_fopen(a,b) diff --git a/src/include/utils/elog.h b/src/include/utils/elog.h index 9c1e75c59ac..6ae376ba001 100644 --- a/src/include/utils/elog.h +++ b/src/include/utils/elog.h @@ -179,29 +179,29 @@ extern int errcode(int sqlerrcode); extern int errcode_for_file_access(void); extern int errcode_for_socket_access(void); = -extern int errmsg(const char *fmt,...) pg_attribute_printf(1, 2); -extern int errmsg_internal(const char *fmt,...) pg_attribute_printf(1, 2)= ; +extern int errmsg(const char *fmt, ...) pg_attribute_printf(1, 2); +extern int errmsg_internal(const char *fmt, ...) pg_attribute_printf(1, 2= ); = extern int errmsg_plural(const char *fmt_singular, const char *fmt_plural= , - unsigned long n,...) pg_attribute_printf(1, 4) pg_attribute_print= f(2, 4); + unsigned long n, ...) pg_attribute_printf(1, 4) pg_attribute_prin= tf(2, 4); = -extern int errdetail(const char *fmt,...) pg_attribute_printf(1, 2); -extern int errdetail_internal(const char *fmt,...) pg_attribute_printf(1,= 2); +extern int errdetail(const char *fmt, ...) pg_attribute_printf(1, 2); +extern int errdetail_internal(const char *fmt, ...) pg_attribute_printf(1= , 2); = -extern int errdetail_log(const char *fmt,...) pg_attribute_printf(1, 2); +extern int errdetail_log(const char *fmt, ...) pg_attribute_printf(1, 2); = extern int errdetail_log_plural(const char *fmt_singular, const char *fmt_plural, - unsigned long n,...) pg_attribute_printf(1, 4) pg_attribute_prin= tf(2, 4); + unsigned long n, ...) pg_attribute_printf(1, 4) pg_attribute_pri= ntf(2, 4); = extern int errdetail_plural(const char *fmt_singular, const char *fmt_plu= ral, - unsigned long n,...) pg_attribute_printf(1, 4) pg_attribute_print= f(2, 4); + unsigned long n, ...) pg_attribute_printf(1, 4) pg_attribute_prin= tf(2, 4); = -extern int errhint(const char *fmt,...) pg_attribute_printf(1, 2); -extern int errhint_internal(const char *fmt,...) pg_attribute_printf(1, 2= ); +extern int errhint(const char *fmt, ...) pg_attribute_printf(1, 2); +extern int errhint_internal(const char *fmt, ...) pg_attribute_printf(1, = 2); = extern int errhint_plural(const char *fmt_singular, const char *fmt_plura= l, - unsigned long n,...) pg_attribute_printf(1, 4) pg_attribute_prin= tf(2, 4); + unsigned long n, ...) pg_attribute_printf(1, 4) pg_attribute_pri= ntf(2, 4); = /* * errcontext() is typically called in error context callback functions, = not @@ -215,7 +215,7 @@ extern int errhint_plural(const char *fmt_singular, co= nst char *fmt_plural, = extern int set_errcontext_domain(const char *domain); = -extern int errcontext_msg(const char *fmt,...) pg_attribute_printf(1, 2); +extern int errcontext_msg(const char *fmt, ...) pg_attribute_printf(1, 2)= ; = extern int errhidestmt(bool hide_stmt); extern int errhidecontext(bool hide_ctx); @@ -303,7 +303,7 @@ extern void errsave_finish(struct Node *context, /* Support for constructing error strings separately from ereport() calls= */ = extern void pre_format_elog_string(int errnumber, const char *domain); -extern char *format_elog_string(const char *fmt,...) pg_attribute_printf(= 1, 2); +extern char *format_elog_string(const char *fmt, ...) pg_attribute_printf= (1, 2); = = /* Support for attaching context information to error reports */ @@ -529,7 +529,7 @@ extern void write_jsonlog(ErrorData *edata); * not available). Used before ereport/elog can be used * safely (memory context, GUC load etc) */ -extern void write_stderr(const char *fmt,...) pg_attribute_printf(1, 2); +extern void write_stderr(const char *fmt, ...) pg_attribute_printf(1, 2); extern void vwrite_stderr(const char *fmt, va_list ap) pg_attribute_print= f(1, 0); = #endif /* ELOG_H */ diff --git a/src/include/utils/palloc.h b/src/include/utils/palloc.h index ac53f189a4e..9295211d200 100644 --- a/src/include/utils/palloc.h +++ b/src/include/utils/palloc.h @@ -147,7 +147,7 @@ extern char *pnstrdup(const char *in, Size len); extern char *pchomp(const char *in); = /* sprintf into a palloc'd buffer --- these are in psprintf.c */ -extern char *psprintf(const char *fmt,...) pg_attribute_printf(1, 2); +extern char *psprintf(const char *fmt, ...) pg_attribute_printf(1, 2); extern size_t pvsnprintf(char *buf, size_t len, const char *fmt, va_list = args) pg_attribute_printf(3, 0); = #endif /* PALLOC_H */ diff --git a/src/interfaces/ecpg/ecpglib/descriptor.c b/src/interfaces/ecp= g/ecpglib/descriptor.c index 1ad5f2d88cc..66356f7c37b 100644 --- a/src/interfaces/ecpg/ecpglib/descriptor.c +++ b/src/interfaces/ecpg/ecpglib/descriptor.c @@ -231,7 +231,7 @@ get_char_item(int lineno, void *var, enum ECPGttype va= rtype, char *value, int va } = bool -ECPGget_desc(int lineno, const char *desc_name, int index,...) +ECPGget_desc(int lineno, const char *desc_name, int index, ...) { va_list args; PGresult *ECPGresult; @@ -618,7 +618,7 @@ set_desc_attr(struct descriptor_item *desc_item, struc= t variable *var, = = bool -ECPGset_desc(int lineno, const char *desc_name, int index,...) +ECPGset_desc(int lineno, const char *desc_name, int index, ...) { va_list args; struct descriptor *desc; @@ -860,7 +860,7 @@ ecpg_find_desc(int line, const char *name) } = bool -ECPGdescribe(int line, int compat, bool input, const char *connection_nam= e, const char *stmt_name,...) +ECPGdescribe(int line, int compat, bool input, const char *connection_nam= e, const char *stmt_name, ...) { bool ret =3D false; struct connection *con; diff --git a/src/interfaces/ecpg/ecpglib/ecpglib_extern.h b/src/interfaces= /ecpg/ecpglib/ecpglib_extern.h index c92f0aa1081..18243bfc568 100644 --- a/src/interfaces/ecpg/ecpglib/ecpglib_extern.h +++ b/src/interfaces/ecpg/ecpglib/ecpglib_extern.h @@ -214,7 +214,7 @@ void ecpg_raise(int line, int code, const char *sqlst= ate, const char *str); void ecpg_raise_backend(int line, PGresult *result, PGconn *conn, int co= mpat); char *ecpg_prepared(const char *name, struct connection *con); bool ecpg_deallocate_all_conn(int lineno, enum COMPAT_MODE c, struct con= nection *con); -void ecpg_log(const char *format,...) pg_attribute_printf(1, 2); +void ecpg_log(const char *format, ...) pg_attribute_printf(1, 2); bool ecpg_auto_prepare(int lineno, const char *connection_name, const int compat, char **name, const char *query); bool ecpg_register_prepared_stmt(struct statement *stmt); diff --git a/src/interfaces/ecpg/ecpglib/execute.c b/src/interfaces/ecpg/e= cpglib/execute.c index ba41732dec6..bac9d2cc39f 100644 --- a/src/interfaces/ecpg/ecpglib/execute.c +++ b/src/interfaces/ecpg/ecpglib/execute.c @@ -2289,7 +2289,7 @@ fail: * The input/output parameters are passed as variable-length argument lis= t. */ bool -ECPGdo(const int lineno, const int compat, const int force_indicator, con= st char *connection_name, const bool questionmarks, const int st, const ch= ar *query,...) +ECPGdo(const int lineno, const int compat, const int force_indicator, con= st char *connection_name, const bool questionmarks, const int st, const ch= ar *query, ...) { va_list args; bool ret; diff --git a/src/interfaces/ecpg/ecpglib/misc.c b/src/interfaces/ecpg/ecpg= lib/misc.c index 40ea174ae9f..354a2e731fc 100644 --- a/src/interfaces/ecpg/ecpglib/misc.c +++ b/src/interfaces/ecpg/ecpglib/misc.c @@ -229,7 +229,7 @@ ECPGdebug(int n, FILE *dbgs) } = void -ecpg_log(const char *format,...) +ecpg_log(const char *format, ...) { va_list ap; const char *intl_format; diff --git a/src/interfaces/ecpg/include/ecpglib.h b/src/interfaces/ecpg/i= nclude/ecpglib.h index dbf3cc3a0c2..1d971d5893d 100644 --- a/src/interfaces/ecpg/include/ecpglib.h +++ b/src/interfaces/ecpg/include/ecpglib.h @@ -29,7 +29,7 @@ bool ECPGconnect(int lineno, int c, const char *name, c= onst char *user, const char *passwd, const char *connection_name, int autocommit); bool ECPGdo(const int lineno, const int compat, const int force_indicato= r, const char *connection_name, const bool questionmarks, - const int st, const char *query,...); + const int st, const char *query, ...); bool ECPGtrans(int lineno, const char *connection_name, const char *tran= saction); bool ECPGdisconnect(int lineno, const char *connection_name); bool ECPGprepare(int lineno, const char *connection_name, const bool que= stionmarks, @@ -55,14 +55,14 @@ bool ECPGdo_descriptor(int line, const char *connecti= on, bool ECPGdeallocate_desc(int line, const char *name); bool ECPGallocate_desc(int line, const char *name); bool ECPGget_desc_header(int lineno, const char *desc_name, int *count); -bool ECPGget_desc(int lineno, const char *desc_name, int index,...); +bool ECPGget_desc(int lineno, const char *desc_name, int index, ...); bool ECPGset_desc_header(int lineno, const char *desc_name, int count); -bool ECPGset_desc(int lineno, const char *desc_name, int index,...); +bool ECPGset_desc(int lineno, const char *desc_name, int index, ...); = void ECPGset_noind_null(enum ECPGttype type, void *ptr); bool ECPGis_noind_null(enum ECPGttype type, const void *ptr); bool ECPGdescribe(int line, int compat, bool input, - const char *connection_name, const char *stmt_name,...); + const char *connection_name, const char *stmt_name, ...); = void ECPGset_var(int number, void *pointer, int lineno); void *ECPGget_var(int number); diff --git a/src/interfaces/ecpg/preproc/preproc_extern.h b/src/interfaces= /ecpg/preproc/preproc_extern.h index 2c89e30621e..c61f054873b 100644 --- a/src/interfaces/ecpg/preproc/preproc_extern.h +++ b/src/interfaces/ecpg/preproc/preproc_extern.h @@ -85,11 +85,11 @@ extern void *loc_alloc(size_t size); extern char *loc_strdup(const char *string); extern void reclaim_local_storage(void); extern char *cat2_str(const char *str1, const char *str2); -extern char *cat_str(int count,...); +extern char *cat_str(int count, ...); extern char *make2_str(const char *str1, const char *str2); extern char *make3_str(const char *str1, const char *str2, const char *st= r3); -extern void mmerror(int error_code, enum errortype type, const char *erro= r,...) pg_attribute_printf(3, 4); -pg_noreturn extern void mmfatal(int error_code, const char *error,...) pg= _attribute_printf(2, 3); +extern void mmerror(int error_code, enum errortype type, const char *erro= r, ...) pg_attribute_printf(3, 4); +pg_noreturn extern void mmfatal(int error_code, const char *error, ...) p= g_attribute_printf(2, 3); extern void output_get_descr_header(const char *desc_name); extern void output_get_descr(const char *desc_name, const char *index); extern void output_set_descr_header(const char *desc_name); diff --git a/src/interfaces/ecpg/preproc/util.c b/src/interfaces/ecpg/prep= roc/util.c index f177df32488..ba1f049a87d 100644 --- a/src/interfaces/ecpg/preproc/util.c +++ b/src/interfaces/ecpg/preproc/util.c @@ -47,7 +47,7 @@ vmmerror(int error_code, enum errortype type, const char= *error, va_list ap) = /* Report an error or warning */ void -mmerror(int error_code, enum errortype type, const char *error,...) +mmerror(int error_code, enum errortype type, const char *error, ...) { va_list ap; = @@ -58,7 +58,7 @@ mmerror(int error_code, enum errortype type, const char = *error,...) = /* Report an error and abandon execution */ void -mmfatal(int error_code, const char *error,...) +mmfatal(int error_code, const char *error, ...) { va_list ap; = @@ -217,7 +217,7 @@ cat2_str(const char *str1, const char *str2) * Concatenate N strings, inserting spaces between them unless they are e= mpty */ char * -cat_str(int count,...) +cat_str(int count, ...) { va_list args; int i; diff --git a/src/interfaces/libpq/fe-exec.c b/src/interfaces/libpq/fe-exec= .c index 203d388bdbf..8c610d170a6 100644 --- a/src/interfaces/libpq/fe-exec.c +++ b/src/interfaces/libpq/fe-exec.c @@ -941,7 +941,7 @@ pqPrepareAsyncResult(PGconn *conn) * a trailing newline, and should not be more than one line). */ void -pqInternalNotice(const PGNoticeHooks *hooks, const char *fmt,...) +pqInternalNotice(const PGNoticeHooks *hooks, const char *fmt, ...) { char msgBuf[1024]; va_list args; diff --git a/src/interfaces/libpq/fe-misc.c b/src/interfaces/libpq/fe-misc= .c index 13775cfb8b9..325a485ef53 100644 --- a/src/interfaces/libpq/fe-misc.c +++ b/src/interfaces/libpq/fe-misc.c @@ -1372,7 +1372,7 @@ libpq_ngettext(const char *msgid, const char *msgid_= plural, unsigned long n) * newline. */ void -libpq_append_error(PQExpBuffer errorMessage, const char *fmt,...) +libpq_append_error(PQExpBuffer errorMessage, const char *fmt, ...) { int save_errno =3D errno; bool done; @@ -1401,7 +1401,7 @@ libpq_append_error(PQExpBuffer errorMessage, const c= har *fmt,...) * format should not end with a newline. */ void -libpq_append_conn_error(PGconn *conn, const char *fmt,...) +libpq_append_conn_error(PGconn *conn, const char *fmt, ...) { int save_errno =3D errno; bool done; diff --git a/src/interfaces/libpq/libpq-int.h b/src/interfaces/libpq/libpq= -int.h index 23de98290c9..60ed4c87d83 100644 --- a/src/interfaces/libpq/libpq-int.h +++ b/src/interfaces/libpq/libpq-int.h @@ -753,7 +753,7 @@ extern char *pqResultStrdup(PGresult *res, const char = *str); extern void pqClearAsyncResult(PGconn *conn); extern void pqSaveErrorResult(PGconn *conn); extern PGresult *pqPrepareAsyncResult(PGconn *conn); -extern void pqInternalNotice(const PGNoticeHooks *hooks, const char *fmt,= ...) pg_attribute_printf(2, 3); +extern void pqInternalNotice(const PGNoticeHooks *hooks, const char *fmt,= ...) pg_attribute_printf(2, 3); extern void pqSaveMessageField(PGresult *res, char code, const char *value); extern int pqSaveParameterStatus(PGconn *conn, const char *name, @@ -957,8 +957,8 @@ extern char *libpq_ngettext(const char *msgid, const c= har *msgid_plural, unsigne */ #undef _ = -extern void libpq_append_error(PQExpBuffer errorMessage, const char *fmt,= ...) pg_attribute_printf(2, 3); -extern void libpq_append_conn_error(PGconn *conn, const char *fmt,...) pg= _attribute_printf(2, 3); +extern void libpq_append_error(PQExpBuffer errorMessage, const char *fmt,= ...) pg_attribute_printf(2, 3); +extern void libpq_append_conn_error(PGconn *conn, const char *fmt, ...) p= g_attribute_printf(2, 3); extern void libpq_append_grease_info(PGconn *conn); = /* diff --git a/src/interfaces/libpq/pqexpbuffer.c b/src/interfaces/libpq/pqe= xpbuffer.c index 153ae6af6cb..7563993f6d6 100644 --- a/src/interfaces/libpq/pqexpbuffer.c +++ b/src/interfaces/libpq/pqexpbuffer.c @@ -232,7 +232,7 @@ enlargePQExpBuffer(PQExpBuffer str, size_t needed) * resetPQExpBuffer() followed by appendPQExpBuffer(). */ void -printfPQExpBuffer(PQExpBuffer str, const char *fmt,...) +printfPQExpBuffer(PQExpBuffer str, const char *fmt, ...) { int save_errno =3D errno; va_list args; @@ -262,7 +262,7 @@ printfPQExpBuffer(PQExpBuffer str, const char *fmt,...= ) * strcat. */ void -appendPQExpBuffer(PQExpBuffer str, const char *fmt,...) +appendPQExpBuffer(PQExpBuffer str, const char *fmt, ...) { int save_errno =3D errno; va_list args; diff --git a/src/interfaces/libpq/pqexpbuffer.h b/src/interfaces/libpq/pqe= xpbuffer.h index dc83f4ffe86..2741bb9e2ff 100644 --- a/src/interfaces/libpq/pqexpbuffer.h +++ b/src/interfaces/libpq/pqexpbuffer.h @@ -146,7 +146,7 @@ extern int enlargePQExpBuffer(PQExpBuffer str, size_t = needed); * This is a convenience routine that does the same thing as * resetPQExpBuffer() followed by appendPQExpBuffer(). */ -extern void printfPQExpBuffer(PQExpBuffer str, const char *fmt,...) pg_at= tribute_printf(2, 3); +extern void printfPQExpBuffer(PQExpBuffer str, const char *fmt, ...) pg_a= ttribute_printf(2, 3); = /*------------------------ * appendPQExpBuffer @@ -155,7 +155,7 @@ extern void printfPQExpBuffer(PQExpBuffer str, const c= har *fmt,...) pg_attribute * to str if necessary. This is sort of like a combination of sprintf an= d * strcat. */ -extern void appendPQExpBuffer(PQExpBuffer str, const char *fmt,...) pg_at= tribute_printf(2, 3); +extern void appendPQExpBuffer(PQExpBuffer str, const char *fmt, ...) pg_a= ttribute_printf(2, 3); = /*------------------------ * appendPQExpBufferVA diff --git a/src/pl/plpython/plpy_elog.c b/src/pl/plpython/plpy_elog.c index e109888cced..a64620559b4 100644 --- a/src/pl/plpython/plpy_elog.c +++ b/src/pl/plpython/plpy_elog.c @@ -41,7 +41,7 @@ static bool set_string_attr(PyObject *obj, char *attrnam= e, char *str); * in the context. */ void -PLy_elog_impl(int elevel, const char *fmt,...) +PLy_elog_impl(int elevel, const char *fmt, ...) { int save_errno =3D errno; char *volatile xmsg =3D NULL; @@ -487,7 +487,7 @@ get_source_line(const char *src, int lineno) = /* call PyErr_SetString with a vprint interface and translation support *= / void -PLy_exception_set(PyObject *exc, const char *fmt,...) +PLy_exception_set(PyObject *exc, const char *fmt, ...) { char buf[1024]; va_list ap; @@ -503,7 +503,7 @@ PLy_exception_set(PyObject *exc, const char *fmt,...) void PLy_exception_set_plural(PyObject *exc, const char *fmt_singular, const char *fmt_plural, - unsigned long n,...) + unsigned long n, ...) { char buf[1024]; va_list ap; diff --git a/src/pl/plpython/plpy_elog.h b/src/pl/plpython/plpy_elog.h index dc65f2f6ee2..3150f9e72ca 100644 --- a/src/pl/plpython/plpy_elog.h +++ b/src/pl/plpython/plpy_elog.h @@ -34,12 +34,12 @@ extern PyObject *PLy_exc_spi_error; } while(0) #endif /* HAVE__BUILTIN_CONSTANT_P */ = -extern PGDLLEXPORT void PLy_elog_impl(int elevel, const char *fmt,...) pg= _attribute_printf(2, 3); +extern PGDLLEXPORT void PLy_elog_impl(int elevel, const char *fmt, ...) p= g_attribute_printf(2, 3); = -extern PGDLLEXPORT void PLy_exception_set(PyObject *exc, const char *fmt,= ...) pg_attribute_printf(2, 3); +extern PGDLLEXPORT void PLy_exception_set(PyObject *exc, const char *fmt,= ...) pg_attribute_printf(2, 3); = extern PGDLLEXPORT void PLy_exception_set_plural(PyObject *exc, const cha= r *fmt_singular, const char *fmt_plural, - unsigned long n,...) pg_attribute_printf(2, 5) pg_attribute_= printf(3, 5); + unsigned long n, ...) pg_attribute_printf(2, 5) pg_attribute= _printf(3, 5); = extern PGDLLEXPORT void PLy_exception_set_with_details(PyObject *excclass= , ErrorData *edata); = diff --git a/src/port/open.c b/src/port/open.c index 2cd26060aa3..4be08b2cf13 100644 --- a/src/port/open.c +++ b/src/port/open.c @@ -165,7 +165,7 @@ pgwin32_open_handle(const char *fileName, int fileFlag= s, bool backup_semantics) } = int -pgwin32_open(const char *fileName, int fileFlags,...) +pgwin32_open(const char *fileName, int fileFlags, ...) { HANDLE h; int fd; diff --git a/src/port/snprintf.c b/src/port/snprintf.c index 5deee44d3a2..2189ebfe399 100644 --- a/src/port/snprintf.c +++ b/src/port/snprintf.c @@ -199,7 +199,7 @@ pg_vsnprintf(char *str, size_t count, const char *fmt,= va_list args) } = int -pg_snprintf(char *str, size_t count, const char *fmt,...) +pg_snprintf(char *str, size_t count, const char *fmt, ...) { int len; va_list args; @@ -227,7 +227,7 @@ pg_vsprintf(char *str, const char *fmt, va_list args) } = int -pg_sprintf(char *str, const char *fmt,...) +pg_sprintf(char *str, const char *fmt, ...) { int len; va_list args; @@ -261,7 +261,7 @@ pg_vfprintf(FILE *stream, const char *fmt, va_list arg= s) } = int -pg_fprintf(FILE *stream, const char *fmt,...) +pg_fprintf(FILE *stream, const char *fmt, ...) { int len; va_list args; @@ -279,7 +279,7 @@ pg_vprintf(const char *fmt, va_list args) } = int -pg_printf(const char *fmt,...) +pg_printf(const char *fmt, ...) { int len; va_list args; diff --git a/src/port/win32security.c b/src/port/win32security.c index 46d2fc774b4..d3ca70f0eac 100644 --- a/src/port/win32security.c +++ b/src/port/win32security.c @@ -17,7 +17,7 @@ #include "postgres_fe.h" #endif = -static void log_error(const char *fmt,...) pg_attribute_printf(1, 2); +static void log_error(const char *fmt, ...) pg_attribute_printf(1, 2); = = /* @@ -25,7 +25,7 @@ static void log_error(const char *fmt,...) pg_attribute_= printf(1, 2); * message. */ static void -log_error(const char *fmt,...) +log_error(const char *fmt, ...) { va_list ap; = diff --git a/src/test/modules/libpq_pipeline/libpq_pipeline.c b/src/test/m= odules/libpq_pipeline/libpq_pipeline.c index aa0a6bbe762..ee3e2ec7570 100644 --- a/src/test/modules/libpq_pipeline/libpq_pipeline.c +++ b/src/test/modules/libpq_pipeline/libpq_pipeline.c @@ -24,7 +24,7 @@ = = static void exit_nicely(PGconn *conn); -pg_noreturn static void pg_fatal_impl(int line, const char *fmt,...) +pg_noreturn static void pg_fatal_impl(int line, const char *fmt, ...) pg_attribute_printf(2, 3); static bool process_result(PGconn *conn, PGresult *res, int results, int numsent); @@ -72,7 +72,7 @@ exit_nicely(PGconn *conn) */ #define pg_fatal(...) pg_fatal_impl(__LINE__, __VA_ARGS__) pg_noreturn static void -pg_fatal_impl(int line, const char *fmt,...) +pg_fatal_impl(int line, const char *fmt, ...) { va_list args; = diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c index c26efeba1ee..1c052cc0fbf 100644 --- a/src/test/regress/pg_regress.c +++ b/src/test/regress/pg_regress.c @@ -149,12 +149,12 @@ static void make_directory(const char *dir); static void test_status_print(bool ok, const char *testname, double runti= me, bool parallel); static void test_status_ok(const char *testname, double runtime, bool par= allel); static void test_status_failed(const char *testname, double runtime, bool= parallel); -static void bail_out(bool noatexit, const char *fmt,...) pg_attribute_pri= ntf(2, 3); -static void emit_tap_output(TAPtype type, const char *fmt,...) pg_attribu= te_printf(2, 3); +static void bail_out(bool noatexit, const char *fmt, ...) pg_attribute_pr= intf(2, 3); +static void emit_tap_output(TAPtype type, const char *fmt, ...) pg_attrib= ute_printf(2, 3); static void emit_tap_output_v(TAPtype type, const char *fmt, va_list argp= ) pg_attribute_printf(2, 0); = static StringInfo psql_start_command(void); -static void psql_add_command(StringInfo buf, const char *query,...) pg_at= tribute_printf(2, 3); +static void psql_add_command(StringInfo buf, const char *query, ...) pg_a= ttribute_printf(2, 3); static void psql_end_command(StringInfo buf, const char *database); = /* @@ -257,7 +257,7 @@ split_to_stringlist(const char *s, const char *delim, = _stringlist **listhead) * exit handlers, thus avoid any risk of bottomless recursion calls to ex= it. */ static void -bail_out(bool noatexit, const char *fmt,...) +bail_out(bool noatexit, const char *fmt, ...) { va_list ap; = @@ -333,7 +333,7 @@ test_status_failed(const char *testname, double runtim= e, bool parallel) = = static void -emit_tap_output(TAPtype type, const char *fmt,...) +emit_tap_output(TAPtype type, const char *fmt, ...) { va_list argp; = @@ -1140,7 +1140,7 @@ psql_start_command(void) } = static void -psql_add_command(StringInfo buf, const char *query,...) +psql_add_command(StringInfo buf, const char *query, ...) { StringInfoData cmdbuf; const char *cmdptr; diff --git a/src/timezone/zic.c b/src/timezone/zic.c index 2f36486a350..8a925cbed6b 100644 --- a/src/timezone/zic.c +++ b/src/timezone/zic.c @@ -123,8 +123,8 @@ extern int link(const char *target, const char *linkna= me); #endif = static void verror(const char *const string, va_list args) pg_attribute_p= rintf(1, 0); -static void error(const char *const string,...) pg_attribute_printf(1, 2)= ; -static void warning(const char *const string,...) pg_attribute_printf(1, = 2); +static void error(const char *const string, ...) pg_attribute_printf(1, 2= ); +static void warning(const char *const string, ...) pg_attribute_printf(1,= 2); static void addtt(zic_t starttime, int type); static int addtype(zic_t utoff, char const *abbr, bool isdst, bool ttisstd, bool ttisut); @@ -515,7 +515,7 @@ verror(const char *const string, va_list args) } = static void -error(const char *const string,...) +error(const char *const string, ...) { va_list args; = @@ -526,7 +526,7 @@ error(const char *const string,...) } = static void -warning(const char *const string,...) +warning(const char *const string, ...) { va_list args; = ------- =_aaaaaaaaaa0--