Commit 88a6ac9f authored by Peter Eisentraut's avatar Peter Eisentraut

pg_dump: Add GCC noreturn attribute to appropriate functions

This is a small help to the compiler and static analyzers.
parent 5ae88c65
...@@ -57,7 +57,7 @@ extern void write_msg(const char *modulename, const char *fmt,...) ...@@ -57,7 +57,7 @@ extern void write_msg(const char *modulename, const char *fmt,...)
extern void vwrite_msg(const char *modulename, const char *fmt, va_list ap) extern void vwrite_msg(const char *modulename, const char *fmt, va_list ap)
__attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 0))); __attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 0)));
extern void exit_horribly(const char *modulename, const char *fmt,...) extern void exit_horribly(const char *modulename, const char *fmt,...)
__attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 3))); __attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 3), noreturn));
extern void set_section (const char *arg, int *dumpSections); extern void set_section (const char *arg, int *dumpSections);
#endif /* DUMPUTILS_H */ #endif /* DUMPUTILS_H */
...@@ -123,7 +123,7 @@ static int RestoringToDB(ArchiveHandle *AH); ...@@ -123,7 +123,7 @@ static int RestoringToDB(ArchiveHandle *AH);
static void dump_lo_buf(ArchiveHandle *AH); static void dump_lo_buf(ArchiveHandle *AH);
static void vdie_horribly(ArchiveHandle *AH, const char *modulename, static void vdie_horribly(ArchiveHandle *AH, const char *modulename,
const char *fmt, va_list ap) const char *fmt, va_list ap)
__attribute__((format(PG_PRINTF_ATTRIBUTE, 3, 0))); __attribute__((format(PG_PRINTF_ATTRIBUTE, 3, 0), noreturn));
static void dumpTimestamp(ArchiveHandle *AH, const char *msg, time_t tim); static void dumpTimestamp(ArchiveHandle *AH, const char *msg, time_t tim);
static void SetOutput(ArchiveHandle *AH, char *filename, int compression); static void SetOutput(ArchiveHandle *AH, char *filename, int compression);
......
...@@ -325,7 +325,7 @@ typedef struct _tocEntry ...@@ -325,7 +325,7 @@ typedef struct _tocEntry
} TocEntry; } TocEntry;
extern void die_horribly(ArchiveHandle *AH, const char *modulename, const char *fmt,...) __attribute__((format(PG_PRINTF_ATTRIBUTE, 3, 4))); extern void die_horribly(ArchiveHandle *AH, const char *modulename, const char *fmt,...) __attribute__((format(PG_PRINTF_ATTRIBUTE, 3, 4), noreturn));
extern void warn_or_die_horribly(ArchiveHandle *AH, const char *modulename, const char *fmt,...) __attribute__((format(PG_PRINTF_ATTRIBUTE, 3, 4))); extern void warn_or_die_horribly(ArchiveHandle *AH, const char *modulename, const char *fmt,...) __attribute__((format(PG_PRINTF_ATTRIBUTE, 3, 4)));
extern void WriteTOC(ArchiveHandle *AH); extern void WriteTOC(ArchiveHandle *AH);
......
...@@ -524,7 +524,7 @@ extern void simple_string_list_append(SimpleStringList *list, const char *val); ...@@ -524,7 +524,7 @@ extern void simple_string_list_append(SimpleStringList *list, const char *val);
extern bool simple_oid_list_member(SimpleOidList *list, Oid val); extern bool simple_oid_list_member(SimpleOidList *list, Oid val);
extern bool simple_string_list_member(SimpleStringList *list, const char *val); extern bool simple_string_list_member(SimpleStringList *list, const char *val);
extern void exit_nicely(void); extern void exit_nicely(void) __attribute__((noreturn));
extern void parseOidArray(const char *str, Oid *array, int arraysize); extern void parseOidArray(const char *str, Oid *array, int arraysize);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment