Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1d678bf

Browse files
committed
Add some noreturn attributes based on compiler recommendations
1 parentfaa14ac commit1d678bf

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-
externvoidtest_shm_mq_main(Datum);
43+
externvoidtest_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-
voidworker_spi_main(Datum);
49+
voidworker_spi_main(Datum) __attribute__((noreturn));
5050

5151
/* flags set by signal handlers */
5252
staticvolatilesig_atomic_tgot_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
externintboot_yyparse(void);
5858

5959
externintboot_yylex(void);
60-
externvoidboot_yyerror(constchar*str);
60+
externvoidboot_yyerror(constchar*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
externintcore_yylex(core_YYSTYPE*lvalp,YYLTYPE*llocp,
115115
core_yyscan_tyyscanner);
116116
externintscanner_errposition(intlocation,core_yyscan_tyyscanner);
117-
externvoidscanner_yyerror(constchar*message,core_yyscan_tyyscanner);
117+
externvoidscanner_yyerror(constchar*message,core_yyscan_tyyscanner) __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
externvoidResetBackgroundWorkerCrashTimes(void);
4747

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

5151
#ifdefEXEC_BACKEND
5252
externBackgroundWorker*BackgroundWorkerEntry(intslotno);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp