Commit 0772c152 authored by Tom Lane's avatar Tom Lane

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
parent cb03fa33
...@@ -237,7 +237,7 @@ static char **filter_lines_with_token(char **lines, const char *token); ...@@ -237,7 +237,7 @@ static char **filter_lines_with_token(char **lines, const char *token);
static char **readfile(const char *path); static char **readfile(const char *path);
static void writefile(char *path, char **lines); static void writefile(char *path, char **lines);
static FILE *popen_check(const char *command, const char *mode); 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 char *get_id(void);
static int get_encoding_id(const char *encoding_name); static int get_encoding_id(const char *encoding_name);
static void set_input(char **dest, const char *filename); static void set_input(char **dest, const char *filename);
......
...@@ -132,7 +132,7 @@ static PQExpBuffer recoveryconfcontents = NULL; ...@@ -132,7 +132,7 @@ static PQExpBuffer recoveryconfcontents = NULL;
/* Function headers */ /* Function headers */
static void usage(void); 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 verify_dir_is_empty_or_create(char *dirname, bool *created, bool *found);
static void progress_report(int tablespacenum, const char *filename, bool force); static void progress_report(int tablespacenum, const char *filename, bool force);
......
...@@ -64,7 +64,7 @@ static XLogRecPtr output_fsync_lsn = InvalidXLogRecPtr; ...@@ -64,7 +64,7 @@ static XLogRecPtr output_fsync_lsn = InvalidXLogRecPtr;
static void usage(void); static void usage(void);
static void StreamLogicalLog(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 bool flushAndSendFeedback(PGconn *conn, TimestampTz *now);
static void prepareToTerminate(PGconn *conn, XLogRecPtr endpos, static void prepareToTerminate(PGconn *conn, XLogRecPtr endpos,
bool keepalive, XLogRecPtr lsn); bool keepalive, XLogRecPtr lsn);
......
...@@ -32,6 +32,7 @@ static int nconns = 0; ...@@ -32,6 +32,7 @@ static int nconns = 0;
/* In dry run only output permutations to be run by the tester. */ /* In dry run only output permutations to be run by the tester. */
static int dry_run = false; static int dry_run = false;
static void exit_nicely(void) pg_attribute_noreturn();
static void run_testspec(TestSpec *testspec); static void run_testspec(TestSpec *testspec);
static void run_all_permutations(TestSpec *testspec); static void run_all_permutations(TestSpec *testspec);
static void run_all_permutations_recurse(TestSpec *testspec, int nsteps, static void run_all_permutations_recurse(TestSpec *testspec, int nsteps,
......
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