summaryrefslogtreecommitdiff
path: root/src/interfaces
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces')
-rw-r--r--src/interfaces/ecpg/include/ecpglib.h4
-rw-r--r--src/interfaces/ecpg/preproc/ecpg.header4
-rw-r--r--src/interfaces/ecpg/preproc/extern.h2
-rw-r--r--src/interfaces/libpq/libpq-int.h13
-rw-r--r--src/interfaces/libpq/pqexpbuffer.c4
-rw-r--r--src/interfaces/libpq/pqexpbuffer.h10
-rw-r--r--src/interfaces/libpq/win32.c4
7 files changed, 12 insertions, 29 deletions
diff --git a/src/interfaces/ecpg/include/ecpglib.h b/src/interfaces/ecpg/include/ecpglib.h
index 5efe59351f..c32df6c5d5 100644
--- a/src/interfaces/ecpg/include/ecpglib.h
+++ b/src/interfaces/ecpg/include/ecpglib.h
@@ -13,9 +13,7 @@
#include <string.h>
#ifdef ENABLE_NLS
-extern char *
-ecpg_gettext(const char *msgid)
-pg_attribute_format_arg(1);
+extern char *ecpg_gettext(const char *msgid) pg_attribute_format_arg(1);
#else
#define ecpg_gettext(x) (x)
#endif
diff --git a/src/interfaces/ecpg/preproc/ecpg.header b/src/interfaces/ecpg/preproc/ecpg.header
index e23407ec8d..f41999a86f 100644
--- a/src/interfaces/ecpg/preproc/ecpg.header
+++ b/src/interfaces/ecpg/preproc/ecpg.header
@@ -61,10 +61,12 @@ struct variable no_indicator = {"no_indicator", &ecpg_no_indicator, 0, NULL};
static struct ECPGtype ecpg_query = {ECPGt_char_variable, NULL, NULL, NULL, {NULL}, 0};
+static void vmmerror(int error_code, enum errortype type, const char *error, va_list ap) pg_attribute_printf(3, 0);
+
/*
* Handle parsing errors and warnings
*/
-static void pg_attribute_printf(3, 0)
+static void
vmmerror(int error_code, enum errortype type, const char *error, va_list ap)
{
/* localize the error message string */
diff --git a/src/interfaces/ecpg/preproc/extern.h b/src/interfaces/ecpg/preproc/extern.h
index 1ce25ebe1b..ea8fd8ed98 100644
--- a/src/interfaces/ecpg/preproc/extern.h
+++ b/src/interfaces/ecpg/preproc/extern.h
@@ -78,7 +78,7 @@ extern void base_yyerror(const char *);
extern void *mm_alloc(size_t), *mm_realloc(void *, size_t);
extern char *mm_strdup(const char *);
extern void mmerror(int errorcode, enum errortype type, const char *error,...) pg_attribute_printf(3, 4);
-extern void mmfatal(int errorcode, const char *error,...) pg_attribute_printf(2, 3) pg_attribute_noreturn;
+extern void mmfatal(int errorcode, const char *error,...) pg_attribute_printf(2, 3) pg_attribute_noreturn();
extern void output_get_descr_header(char *);
extern void output_get_descr(char *, char *);
extern void output_set_descr_header(char *);
diff --git a/src/interfaces/libpq/libpq-int.h b/src/interfaces/libpq/libpq-int.h
index b9b630a222..21759578f3 100644
--- a/src/interfaces/libpq/libpq-int.h
+++ b/src/interfaces/libpq/libpq-int.h
@@ -545,10 +545,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,...)
-/* This lets gcc check the format string for consistency. */
-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 void pqSaveParameterStatus(PGconn *conn, const char *name,
@@ -651,12 +648,8 @@ extern ssize_t pgtls_write(PGconn *conn, const void *ptr, size_t len);
#define pqIsnonblocking(conn) ((conn)->nonblocking)
#ifdef ENABLE_NLS
-extern char *
-libpq_gettext(const char *msgid)
-pg_attribute_format_arg(1);
-extern char *
-libpq_ngettext(const char *msgid, const char *msgid_plural, unsigned long n)
-pg_attribute_format_arg(1) pg_attribute_format_arg(2);
+extern char *libpq_gettext(const char *msgid) pg_attribute_format_arg(1);
+extern char *libpq_ngettext(const char *msgid, const char *msgid_plural, unsigned long n) pg_attribute_format_arg(1) pg_attribute_format_arg(2);
#else
#define libpq_gettext(x) (x)
#define libpq_ngettext(s, p, n) ((n) == 1 ? (s) : (p))
diff --git a/src/interfaces/libpq/pqexpbuffer.c b/src/interfaces/libpq/pqexpbuffer.c
index 43df56a1e0..15a92e626d 100644
--- a/src/interfaces/libpq/pqexpbuffer.c
+++ b/src/interfaces/libpq/pqexpbuffer.c
@@ -37,9 +37,7 @@
/* All "broken" PQExpBuffers point to this string. */
static const char oom_buffer[1] = "";
-static bool
-appendPQExpBufferVA(PQExpBuffer str, const char *fmt, va_list args)
-pg_attribute_printf(2, 0);
+static bool appendPQExpBufferVA(PQExpBuffer str, const char *fmt, va_list args) pg_attribute_printf(2, 0);
/*
diff --git a/src/interfaces/libpq/pqexpbuffer.h b/src/interfaces/libpq/pqexpbuffer.h
index 345d20376b..0342c9649c 100644
--- a/src/interfaces/libpq/pqexpbuffer.h
+++ b/src/interfaces/libpq/pqexpbuffer.h
@@ -146,10 +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,...)
-/* This extension allows gcc to check the format string */
-pg_attribute_printf(2, 3);
+extern void printfPQExpBuffer(PQExpBuffer str, const char *fmt,...) pg_attribute_printf(2, 3);
/*------------------------
* appendPQExpBuffer
@@ -158,10 +155,7 @@ pg_attribute_printf(2, 3);
* to str if necessary. This is sort of like a combination of sprintf and
* strcat.
*/
-extern void
-appendPQExpBuffer(PQExpBuffer str, const char *fmt,...)
-/* This extension allows gcc to check the format string */
-pg_attribute_printf(2, 3);
+extern void appendPQExpBuffer(PQExpBuffer str, const char *fmt,...) pg_attribute_printf(2, 3);
/*------------------------
* appendPQExpBufferStr
diff --git a/src/interfaces/libpq/win32.c b/src/interfaces/libpq/win32.c
index 04c5ed4b72..ee91f81021 100644
--- a/src/interfaces/libpq/win32.c
+++ b/src/interfaces/libpq/win32.c
@@ -34,9 +34,7 @@
/* Declared here to avoid pulling in all includes, which causes name collissions */
#ifdef ENABLE_NLS
-extern char *
-libpq_gettext(const char *msgid)
-pg_attribute_format_arg(1);
+extern char *libpq_gettext(const char *msgid) pg_attribute_format_arg(1);
#else
#define libpq_gettext(x) (x)
#endif