diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2014-08-13 22:40:48 -0400 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2014-08-13 22:40:48 -0400 |
commit | 1d678bf7bc66d4478bdee51278946dcc9ae8cae5 (patch) | |
tree | 35bb76a590f2c3b96bf2e0eb0a4f2273641afb65 | |
parent | faa14acc9b958d7b811d0aa624774f36e3fab750 (diff) | |
download | postgresql-1d678bf7bc66d4478bdee51278946dcc9ae8cae5.tar.gz postgresql-1d678bf7bc66d4478bdee51278946dcc9ae8cae5.zip |
Add some noreturn attributes based on compiler recommendations
-rw-r--r-- | contrib/test_shm_mq/test_shm_mq.h | 2 | ||||
-rw-r--r-- | contrib/worker_spi/worker_spi.c | 2 | ||||
-rw-r--r-- | src/include/bootstrap/bootstrap.h | 2 | ||||
-rw-r--r-- | src/include/parser/scanner.h | 2 | ||||
-rw-r--r-- | src/include/postmaster/bgworker_internals.h | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/contrib/test_shm_mq/test_shm_mq.h b/contrib/test_shm_mq/test_shm_mq.h index 7ebfba902f9..04a7931fa94 100644 --- a/contrib/test_shm_mq/test_shm_mq.h +++ b/contrib/test_shm_mq/test_shm_mq.h @@ -40,6 +40,6 @@ extern void test_shm_mq_setup(int64 queue_size, int32 nworkers, shm_mq_handle **input); /* Main entrypoint for a worker. */ -extern void test_shm_mq_main(Datum); +extern void test_shm_mq_main(Datum) __attribute__((noreturn)); #endif diff --git a/contrib/worker_spi/worker_spi.c b/contrib/worker_spi/worker_spi.c index 829de0e6a7f..328c722c359 100644 --- a/contrib/worker_spi/worker_spi.c +++ b/contrib/worker_spi/worker_spi.c @@ -46,7 +46,7 @@ PG_MODULE_MAGIC; PG_FUNCTION_INFO_V1(worker_spi_launch); void _PG_init(void); -void worker_spi_main(Datum); +void worker_spi_main(Datum) __attribute__((noreturn)); /* flags set by signal handlers */ static volatile sig_atomic_t got_sighup = false; diff --git a/src/include/bootstrap/bootstrap.h b/src/include/bootstrap/bootstrap.h index 24ad93dbe97..4d954eb28ee 100644 --- a/src/include/bootstrap/bootstrap.h +++ b/src/include/bootstrap/bootstrap.h @@ -57,6 +57,6 @@ extern void boot_get_type_io_data(Oid typid, extern int boot_yyparse(void); extern int boot_yylex(void); -extern void boot_yyerror(const char *str); +extern void boot_yyerror(const char *str) __attribute__((noreturn)); #endif /* BOOTSTRAP_H */ diff --git a/src/include/parser/scanner.h b/src/include/parser/scanner.h index 1f2d185234e..008d93f9af7 100644 --- a/src/include/parser/scanner.h +++ b/src/include/parser/scanner.h @@ -114,6 +114,6 @@ extern void scanner_finish(core_yyscan_t yyscanner); extern int core_yylex(core_YYSTYPE *lvalp, YYLTYPE *llocp, core_yyscan_t yyscanner); extern int scanner_errposition(int location, core_yyscan_t yyscanner); -extern void scanner_yyerror(const char *message, core_yyscan_t yyscanner); +extern void scanner_yyerror(const char *message, core_yyscan_t yyscanner) __attribute__((noreturn)); #endif /* SCANNER_H */ diff --git a/src/include/postmaster/bgworker_internals.h b/src/include/postmaster/bgworker_internals.h index c2518a6c8d7..6a69a5b5229 100644 --- a/src/include/postmaster/bgworker_internals.h +++ b/src/include/postmaster/bgworker_internals.h @@ -46,7 +46,7 @@ extern void BackgroundWorkerStopNotifications(pid_t pid); extern void ResetBackgroundWorkerCrashTimes(void); /* Function to start a background worker, called from postmaster.c */ -extern void StartBackgroundWorker(void); +extern void StartBackgroundWorker(void) __attribute__((noreturn)); #ifdef EXEC_BACKEND extern BackgroundWorker *BackgroundWorkerEntry(int slotno); |