Skip to content

Commit 1d678bf

Browse files
committed
Add some noreturn attributes based on compiler recommendations
1 parent faa14ac commit 1d678bf

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

contrib/test_shm_mq/test_shm_mq.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ extern void test_shm_mq_setup(int64 queue_size, int32 nworkers,
4040
shm_mq_handle **input);
4141

4242
/* Main entrypoint for a worker. */
43-
extern void test_shm_mq_main(Datum);
43+
extern void test_shm_mq_main(Datum) __attribute__((noreturn));
4444

4545
#endif

contrib/worker_spi/worker_spi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ PG_MODULE_MAGIC;
4646
PG_FUNCTION_INFO_V1(worker_spi_launch);
4747

4848
void _PG_init(void);
49-
void worker_spi_main(Datum);
49+
void worker_spi_main(Datum) __attribute__((noreturn));
5050

5151
/* flags set by signal handlers */
5252
static volatile sig_atomic_t got_sighup = false;

src/include/bootstrap/bootstrap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@ extern void boot_get_type_io_data(Oid typid,
5757
extern int boot_yyparse(void);
5858

5959
extern int boot_yylex(void);
60-
extern void boot_yyerror(const char *str);
60+
extern void boot_yyerror(const char *str) __attribute__((noreturn));
6161

6262
#endif /* BOOTSTRAP_H */

src/include/parser/scanner.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,6 @@ extern void scanner_finish(core_yyscan_t yyscanner);
114114
extern int core_yylex(core_YYSTYPE *lvalp, YYLTYPE *llocp,
115115
core_yyscan_t yyscanner);
116116
extern int scanner_errposition(int location, core_yyscan_t yyscanner);
117-
extern void scanner_yyerror(const char *message, core_yyscan_t yyscanner);
117+
extern void scanner_yyerror(const char *message, core_yyscan_t yyscanner) __attribute__((noreturn));
118118

119119
#endif /* SCANNER_H */

src/include/postmaster/bgworker_internals.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ extern void BackgroundWorkerStopNotifications(pid_t pid);
4646
extern void ResetBackgroundWorkerCrashTimes(void);
4747

4848
/* Function to start a background worker, called from postmaster.c */
49-
extern void StartBackgroundWorker(void);
49+
extern void StartBackgroundWorker(void) __attribute__((noreturn));
5050

5151
#ifdef EXEC_BACKEND
5252
extern BackgroundWorker *BackgroundWorkerEntry(int slotno);

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