Add some noreturn attributes based on compiler recommendations

This commit is contained in:
Peter Eisentraut 2014-08-13 22:40:48 -04:00
parent faa14acc9b
commit 1d678bf7bc
5 changed files with 5 additions and 5 deletions

View File

@ -40,6 +40,6 @@ extern void test_shm_mq_setup(int64 queue_size, int32 nworkers,
shm_mq_handle **input); shm_mq_handle **input);
/* Main entrypoint for a worker. */ /* Main entrypoint for a worker. */
extern void test_shm_mq_main(Datum); extern void test_shm_mq_main(Datum) __attribute__((noreturn));
#endif #endif

View File

@ -46,7 +46,7 @@ PG_MODULE_MAGIC;
PG_FUNCTION_INFO_V1(worker_spi_launch); PG_FUNCTION_INFO_V1(worker_spi_launch);
void _PG_init(void); void _PG_init(void);
void worker_spi_main(Datum); void worker_spi_main(Datum) __attribute__((noreturn));
/* flags set by signal handlers */ /* flags set by signal handlers */
static volatile sig_atomic_t got_sighup = false; static volatile sig_atomic_t got_sighup = false;

View File

@ -57,6 +57,6 @@ extern void boot_get_type_io_data(Oid typid,
extern int boot_yyparse(void); extern int boot_yyparse(void);
extern int boot_yylex(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 */ #endif /* BOOTSTRAP_H */

View File

@ -114,6 +114,6 @@ extern void scanner_finish(core_yyscan_t yyscanner);
extern int core_yylex(core_YYSTYPE *lvalp, YYLTYPE *llocp, extern int core_yylex(core_YYSTYPE *lvalp, YYLTYPE *llocp,
core_yyscan_t yyscanner); core_yyscan_t yyscanner);
extern int scanner_errposition(int location, 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 */ #endif /* SCANNER_H */

View File

@ -46,7 +46,7 @@ extern void BackgroundWorkerStopNotifications(pid_t pid);
extern void ResetBackgroundWorkerCrashTimes(void); extern void ResetBackgroundWorkerCrashTimes(void);
/* Function to start a background worker, called from postmaster.c */ /* Function to start a background worker, called from postmaster.c */
extern void StartBackgroundWorker(void); extern void StartBackgroundWorker(void) __attribute__((noreturn));
#ifdef EXEC_BACKEND #ifdef EXEC_BACKEND
extern BackgroundWorker *BackgroundWorkerEntry(int slotno); extern BackgroundWorker *BackgroundWorkerEntry(int slotno);