]> granicus.if.org Git - postgresql/commitdiff
Mark some more functions as pg_attribute_noreturn().
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 28 Nov 2017 01:56:46 +0000 (20:56 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 28 Nov 2017 01:56:46 +0000 (20:56 -0500)
Doing this suppresses Coverity warnings and might allow improved
code in some cases.  The prospects of that are not so bright as
to warrant back-patching, though.

Michael Paquier, per Coverity

src/bin/initdb/initdb.c
src/bin/pg_basebackup/pg_basebackup.c
src/bin/pg_basebackup/pg_recvlogical.c
src/test/isolation/isolationtester.c

index bb2bc065ef96a800b49cf9d9882c3f3ff810f623..ad0d0e2ac0989f8d3b6fcfb66d083662ed7abca7 100644 (file)
@@ -237,7 +237,7 @@ static char **filter_lines_with_token(char **lines, const char *token);
 static char **readfile(const char *path);
 static void writefile(char *path, char **lines);
 static FILE *popen_check(const char *command, const char *mode);
-static void exit_nicely(void);
+static void exit_nicely(void) pg_attribute_noreturn();
 static char *get_id(void);
 static int get_encoding_id(const char *encoding_name);
 static void set_input(char **dest, const char *filename);
index a8715d912d517889ad4e765d96b42fccf0c72cb9..8427c97fe4a809719fd417cbd7a136df0158908f 100644 (file)
@@ -132,7 +132,7 @@ static PQExpBuffer recoveryconfcontents = NULL;
 
 /* Function headers */
 static void usage(void);
-static void disconnect_and_exit(int code);
+static void disconnect_and_exit(int code) pg_attribute_noreturn();
 static void verify_dir_is_empty_or_create(char *dirname, bool *created, bool *found);
 static void progress_report(int tablespacenum, const char *filename, bool force);
 
index 3109d0f99fb071a48f84d7d38dc5a45111ff9cf9..c7893c10cab106af596f3b1ff1c251ae45ca00ee 100644 (file)
@@ -64,7 +64,7 @@ static XLogRecPtr output_fsync_lsn = InvalidXLogRecPtr;
 
 static void usage(void);
 static void StreamLogicalLog(void);
-static void disconnect_and_exit(int code);
+static void disconnect_and_exit(int code) pg_attribute_noreturn();
 static bool flushAndSendFeedback(PGconn *conn, TimestampTz *now);
 static void prepareToTerminate(PGconn *conn, XLogRecPtr endpos,
                                   bool keepalive, XLogRecPtr lsn);
index ba8082c98033eaf8a2485235a795f34643867ddb..4ecad038bdc24eceaf0a8a9fb3bd8e6919d81274 100644 (file)
@@ -32,6 +32,7 @@ static int    nconns = 0;
 /* In dry run only output permutations to be run by the tester. */
 static int     dry_run = false;
 
+static void exit_nicely(void) pg_attribute_noreturn();
 static void run_testspec(TestSpec *testspec);
 static void run_all_permutations(TestSpec *testspec);
 static void run_all_permutations_recurse(TestSpec *testspec, int nsteps,