Skip to content

Commit 0772c15

Browse files
committed
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
1 parent cb03fa3 commit 0772c15

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

src/bin/initdb/initdb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ static char **filter_lines_with_token(char **lines, const char *token);
237237
static char **readfile(const char *path);
238238
static void writefile(char *path, char **lines);
239239
static FILE *popen_check(const char *command, const char *mode);
240-
static void exit_nicely(void);
240+
static void exit_nicely(void) pg_attribute_noreturn();
241241
static char *get_id(void);
242242
static int get_encoding_id(const char *encoding_name);
243243
static void set_input(char **dest, const char *filename);

src/bin/pg_basebackup/pg_basebackup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ static PQExpBuffer recoveryconfcontents = NULL;
132132

133133
/* Function headers */
134134
static void usage(void);
135-
static void disconnect_and_exit(int code);
135+
static void disconnect_and_exit(int code) pg_attribute_noreturn();
136136
static void verify_dir_is_empty_or_create(char *dirname, bool *created, bool *found);
137137
static void progress_report(int tablespacenum, const char *filename, bool force);
138138

src/bin/pg_basebackup/pg_recvlogical.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ static XLogRecPtr output_fsync_lsn = InvalidXLogRecPtr;
6464

6565
static void usage(void);
6666
static void StreamLogicalLog(void);
67-
static void disconnect_and_exit(int code);
67+
static void disconnect_and_exit(int code) pg_attribute_noreturn();
6868
static bool flushAndSendFeedback(PGconn *conn, TimestampTz *now);
6969
static void prepareToTerminate(PGconn *conn, XLogRecPtr endpos,
7070
bool keepalive, XLogRecPtr lsn);

src/test/isolation/isolationtester.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ static int nconns = 0;
3232
/* In dry run only output permutations to be run by the tester. */
3333
static int dry_run = false;
3434

35+
static void exit_nicely(void) pg_attribute_noreturn();
3536
static void run_testspec(TestSpec *testspec);
3637
static void run_all_permutations(TestSpec *testspec);
3738
static void run_all_permutations_recurse(TestSpec *testspec, int nsteps,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy