From 1d678bf7bc66d4478bdee51278946dcc9ae8cae5 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Wed, 13 Aug 2014 22:40:48 -0400 Subject: Add some noreturn attributes based on compiler recommendations --- src/include/bootstrap/bootstrap.h | 2 +- src/include/parser/scanner.h | 2 +- src/include/postmaster/bgworker_internals.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/include/bootstrap/bootstrap.h b/src/include/bootstrap/bootstrap.h index 24ad93dbe9..4d954eb28e 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 1f2d185234..008d93f9af 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 c2518a6c8d..6a69a5b522 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); -- cgit v1.2.1