diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2017-11-27 20:56:46 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2017-11-27 20:56:46 -0500 |
commit | 0772c152b9bd02baeca6920c3371fce95e8f13dc (patch) | |
tree | b848b3e13a892ab2237130514ee290138cce0670 /src | |
parent | cb03fa33aeaea4775b9f3437a2240de4ac9cb630 (diff) | |
download | postgresql-0772c152b9bd02baeca6920c3371fce95e8f13dc.tar.gz postgresql-0772c152b9bd02baeca6920c3371fce95e8f13dc.zip |
Mark some more functions as pg_attribute_noreturn().
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
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/initdb/initdb.c | 2 | ||||
-rw-r--r-- | src/bin/pg_basebackup/pg_basebackup.c | 2 | ||||
-rw-r--r-- | src/bin/pg_basebackup/pg_recvlogical.c | 2 | ||||
-rw-r--r-- | src/test/isolation/isolationtester.c | 1 |
4 files changed, 4 insertions, 3 deletions
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c index bb2bc065ef9..ad0d0e2ac09 100644 --- a/src/bin/initdb/initdb.c +++ b/src/bin/initdb/initdb.c @@ -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); diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c index a8715d912d5..8427c97fe4a 100644 --- a/src/bin/pg_basebackup/pg_basebackup.c +++ b/src/bin/pg_basebackup/pg_basebackup.c @@ -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); diff --git a/src/bin/pg_basebackup/pg_recvlogical.c b/src/bin/pg_basebackup/pg_recvlogical.c index 3109d0f99fb..c7893c10cab 100644 --- a/src/bin/pg_basebackup/pg_recvlogical.c +++ b/src/bin/pg_basebackup/pg_recvlogical.c @@ -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); diff --git a/src/test/isolation/isolationtester.c b/src/test/isolation/isolationtester.c index ba8082c9803..4ecad038bdc 100644 --- a/src/test/isolation/isolationtester.c +++ b/src/test/isolation/isolationtester.c @@ -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, |