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

Commit3691edf

Browse files
committed
pg_noreturn to replace pg_attribute_noreturn()
We want to support a "noreturn" decoration on more compilers besidesjust GCC-compatible ones, but for that we need to move the decorationin front of the function declaration instead of either behind it orwherever, which is the current style afforded by GCC-style attributes.Also rename the macro to "pg_noreturn" to be similar to the C11standard "noreturn".pg_noreturn is now supported on all compilers that support C11 (using_Noreturn), as well as GCC-compatible ones (using __attribute__, asbefore), as well as MSVC (using __declspec). (When PostgreSQLrequires C11, the latter two variants can be dropped.)Now, all supported compilers effectively support pg_noreturn, so theextra code for !HAVE_PG_ATTRIBUTE_NORETURN can be dropped.This also fixes a possible problem if third-party code includesstdnoreturn.h, because then the current definition of #define pg_attribute_noreturn() __attribute__((noreturn))would cause an error.Note that the C standard does not support a noreturn attribute onfunction pointer types. So we have to drop these here. There areonly two instances at this time, so it's not a big loss. In one case,we can make up for it by adding the pg_noreturn to a wrapper functionand adding a pg_unreachable(), in the other case, the latter wasalready done before.Reviewed-by: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>Reviewed-by: Andres Freund <andres@anarazel.de>Discussion:https://www.postgresql.org/message-id/flat/pxr5b3z7jmkpenssra5zroxi7qzzp6eswuggokw64axmdixpnk@zbwxuq7gbbcw
1 parentcc5d985 commit3691edf

File tree

54 files changed

+118
-118
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+118
-118
lines changed

‎contrib/dblink/dblink.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,7 @@ xpstrdup(const char *in)
160160
returnpstrdup(in);
161161
}
162162

163-
staticvoid
164-
pg_attribute_noreturn()
163+
pg_noreturnstaticvoid
165164
dblink_res_internalerror(PGconn*conn,PGresult*res,constchar*p2)
166165
{
167166
char*msg=pchomp(PQerrorMessage(conn));
@@ -170,8 +169,7 @@ dblink_res_internalerror(PGconn *conn, PGresult *res, const char *p2)
170169
elog(ERROR,"%s: %s",p2,msg);
171170
}
172171

173-
staticvoid
174-
pg_attribute_noreturn()
172+
pg_noreturnstaticvoid
175173
dblink_conn_not_avail(constchar*conname)
176174
{
177175
if (conname)

‎contrib/pgcrypto/px.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ intpx_find_hmac(const char *name, PX_HMAC **res);
181181
intpx_find_cipher(constchar*name,PX_Cipher**res);
182182
intpx_find_combo(constchar*name,PX_Combo**res);
183183

184-
voidpx_THROW_ERROR(interr)pg_attribute_noreturn();
184+
pg_noreturnvoidpx_THROW_ERROR(interr);
185185
constchar*px_strerror(interr);
186186

187187
constchar*px_resolve_alias(constPX_Alias*list,constchar*name);

‎src/backend/access/transam/xlogrecovery.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4778,8 +4778,7 @@ check_primary_slot_name(char **newval, void **extra, GucSource source)
47784778
* that we have odd behaviors such as unexpected GUC ordering dependencies.
47794779
*/
47804780

4781-
staticvoid
4782-
pg_attribute_noreturn()
4781+
pg_noreturnstaticvoid
47834782
error_multiple_recovery_targets(void)
47844783
{
47854784
ereport(ERROR,

‎src/backend/backup/basebackup_incremental.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,9 @@ static void manifest_process_wal_range(JsonManifestParseContext *context,
139139
TimeLineIDtli,
140140
XLogRecPtrstart_lsn,
141141
XLogRecPtrend_lsn);
142-
staticvoidmanifest_report_error(JsonManifestParseContext*context,
143-
constchar*fmt,...)
144-
pg_attribute_printf(2,3)pg_attribute_noreturn();
142+
pg_noreturnstaticvoidmanifest_report_error(JsonManifestParseContext*context,
143+
constchar*fmt,...)
144+
pg_attribute_printf(2,3);
145145
staticintcompare_block_numbers(constvoid*a,constvoid*b);
146146

147147
/*

‎src/backend/postmaster/autovacuum.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ intAutovacuumLauncherPid = 0;
317317

318318
staticOiddo_start_worker(void);
319319
staticvoidProcessAutoVacLauncherInterrupts(void);
320-
staticvoidAutoVacLauncherShutdown(void)pg_attribute_noreturn();
320+
pg_noreturnstaticvoidAutoVacLauncherShutdown(void);
321321
staticvoidlauncher_determine_sleep(boolcanlaunch,boolrecursing,
322322
structtimeval*nap);
323323
staticvoidlaunch_worker(TimestampTznow);

‎src/backend/postmaster/launch_backend.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ static pid_t internal_forkexec(const char *child_kind, int child_slot,
171171
typedefstruct
172172
{
173173
constchar*name;
174-
void(*main_fn) (constvoid*startup_data,size_tstartup_data_len)pg_attribute_noreturn();
174+
void(*main_fn) (constvoid*startup_data,size_tstartup_data_len);
175175
boolshmem_attach;
176176
}child_process_kind;
177177

‎src/backend/postmaster/postmaster.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ static void LogChildExit(int lev, const char *procname,
425425
staticvoidPostmasterStateMachine(void);
426426
staticvoidUpdatePMState(PMStatenewState);
427427

428-
staticvoidExitPostmaster(intstatus)pg_attribute_noreturn();
428+
pg_noreturnstaticvoidExitPostmaster(intstatus);
429429
staticintServerLoop(void);
430430
staticintBackendStartup(ClientSocket*client_sock);
431431
staticvoidreport_fork_failure_to_client(ClientSocket*client_sock,interrnum);

‎src/backend/replication/logical/tablesync.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,7 @@ static StringInfo copybuf = NULL;
139139
/*
140140
* Exit routine for synchronization worker.
141141
*/
142-
staticvoid
143-
pg_attribute_noreturn()
142+
pg_noreturnstaticvoid
144143
finish_sync_worker(void)
145144
{
146145
/*

‎src/backend/replication/walsender.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ typedef void (*WalSndSendDataCallback) (void);
237237
staticvoidWalSndLoop(WalSndSendDataCallbacksend_data);
238238
staticvoidInitWalSenderSlot(void);
239239
staticvoidWalSndKill(intcode,Datumarg);
240-
staticvoidWalSndShutdown(void)pg_attribute_noreturn();
240+
pg_noreturnstaticvoidWalSndShutdown(void);
241241
staticvoidXLogSendPhysical(void);
242242
staticvoidXLogSendLogical(void);
243243
staticvoidWalSndDone(WalSndSendDataCallbacksend_data);

‎src/backend/utils/adt/ri_triggers.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,10 @@ static bool ri_PerformCheck(const RI_ConstraintInfo *riinfo,
235235
staticvoidri_ExtractValues(Relationrel,TupleTableSlot*slot,
236236
constRI_ConstraintInfo*riinfo,boolrel_is_pk,
237237
Datum*vals,char*nulls);
238-
staticvoidri_ReportViolation(constRI_ConstraintInfo*riinfo,
239-
Relationpk_rel,Relationfk_rel,
240-
TupleTableSlot*violatorslot,TupleDesctupdesc,
241-
intqueryno,boolis_restrict,boolpartgone)pg_attribute_noreturn();
238+
pg_noreturnstaticvoidri_ReportViolation(constRI_ConstraintInfo*riinfo,
239+
Relationpk_rel,Relationfk_rel,
240+
TupleTableSlot*violatorslot,TupleDesctupdesc,
241+
intqueryno,boolis_restrict,boolpartgone);
242242

243243

244244
/*

‎src/backend/utils/fmgr/dfmgr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ static DynamicFileList *file_tail = NULL;
6767
char*Dynamic_library_path;
6868

6969
staticvoid*internal_load_library(constchar*libname);
70-
staticvoidincompatible_module_error(constchar*libname,
71-
constPg_magic_struct*module_magic_data)pg_attribute_noreturn();
70+
pg_noreturnstaticvoidincompatible_module_error(constchar*libname,
71+
constPg_magic_struct*module_magic_data);
7272
staticchar*expand_dynamic_library_name(constchar*name);
7373
staticvoidcheck_restricted_library_name(constchar*name);
7474
staticchar*substitute_libpath_macro(constchar*name);

‎src/backend/utils/hash/dynahash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ static HASHBUCKET get_hash_entry(HTAB *hashp, int freelist_idx);
272272
staticvoidhdefault(HTAB*hashp);
273273
staticintchoose_nelem_alloc(Sizeentrysize);
274274
staticboolinit_htab(HTAB*hashp,longnelem);
275-
staticvoidhash_corrupted(HTAB*hashp)pg_attribute_noreturn();
275+
pg_noreturnstaticvoidhash_corrupted(HTAB*hashp);
276276
staticuint32hash_initial_lookup(HTAB*hashp,uint32hashvalue,
277277
HASHBUCKET**bucketptr);
278278
staticlongnext_pow2_long(longnum);

‎src/backend/utils/mmgr/slab.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,8 +601,8 @@ SlabAllocFromNewBlock(MemoryContext context, Size size, int flags)
601601
*want to avoid that.
602602
*/
603603
pg_noinline
604+
pg_noreturn
604605
staticvoid
605-
pg_attribute_noreturn()
606606
SlabAllocInvalidSize(MemoryContextcontext,Sizesize)
607607
{
608608
SlabContext*slab= (SlabContext*)context;

‎src/bin/pg_combinebackup/load_manifest.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ static void combinebackup_per_wal_range_cb(JsonManifestParseContext *context,
6868
TimeLineIDtli,
6969
XLogRecPtrstart_lsn,
7070
XLogRecPtrend_lsn);
71-
staticvoidreport_manifest_error(JsonManifestParseContext*context,
72-
constchar*fmt,...)
73-
pg_attribute_printf(2,3)pg_attribute_noreturn();
71+
pg_noreturnstaticvoidreport_manifest_error(JsonManifestParseContext*context,
72+
constchar*fmt,...)
73+
pg_attribute_printf(2,3);
7474

7575
/*
7676
* Load backup_manifest files from an array of backups and produces an array

‎src/bin/pg_dump/pg_backup_utils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ extern const char *progname;
2929

3030
externvoidset_dump_section(constchar*arg,int*dumpSections);
3131
externvoidon_exit_nicely(on_exit_nicely_callbackfunction,void*arg);
32-
externvoidexit_nicely(intcode)pg_attribute_noreturn();
32+
pg_noreturnexternvoidexit_nicely(intcode);
3333

3434
/* In pg_dump, we modify pg_fatal to call exit_nicely instead of exit */
3535
#undef pg_fatal

‎src/bin/pg_upgrade/pg_upgrade.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ intget_user_info(char **user_name_p);
481481
voidcheck_ok(void);
482482
voidreport_status(eLogTypetype,constchar*fmt,...)pg_attribute_printf(2,3);
483483
voidpg_log(eLogTypetype,constchar*fmt,...)pg_attribute_printf(2,3);
484-
voidpg_fatal(constchar*fmt,...)pg_attribute_printf(1,2)pg_attribute_noreturn();
484+
pg_noreturnvoidpg_fatal(constchar*fmt,...)pg_attribute_printf(1,2);
485485
voidend_progress_output(void);
486486
voidcleanup_output_dirs(void);
487487
voidprep_status(constchar*fmt,...)pg_attribute_printf(1,2);

‎src/bin/pg_verifybackup/pg_verifybackup.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ static void verifybackup_per_wal_range_cb(JsonManifestParseContext *context,
6969
TimeLineIDtli,
7070
XLogRecPtrstart_lsn,
7171
XLogRecPtrend_lsn);
72-
staticvoidreport_manifest_error(JsonManifestParseContext*context,
73-
constchar*fmt,...)
74-
pg_attribute_printf(2,3)pg_attribute_noreturn();
72+
pg_noreturnstaticvoidreport_manifest_error(JsonManifestParseContext*context,
73+
constchar*fmt,...)
74+
pg_attribute_printf(2,3);
7575

7676
staticvoidverify_tar_backup(verifier_context*context,DIR*dir);
7777
staticvoidverify_plain_backup_directory(verifier_context*context,

‎src/bin/pg_verifybackup/pg_verifybackup.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ typedef struct verifier_context
9898
externvoidreport_backup_error(verifier_context*context,
9999
constchar*pg_restrictfmt,...)
100100
pg_attribute_printf(2,3);
101-
externvoidreport_fatal_error(constchar*pg_restrictfmt,...)
102-
pg_attribute_printf(1,2)pg_attribute_noreturn();
101+
pg_noreturnexternvoidreport_fatal_error(constchar*pg_restrictfmt,...)
102+
pg_attribute_printf(1,2);
103103
externboolshould_ignore_relpath(verifier_context*context,
104104
constchar*relpath);
105105

‎src/bin/pgbench/pgbench.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,9 @@ struct PgBenchExprList
140140

141141
externintexpr_yyparse(PgBenchExpr**expr_parse_result_p,yyscan_tyyscanner);
142142
externintexpr_yylex(unionYYSTYPE*yylval_param,yyscan_tyyscanner);
143-
externvoidexpr_yyerror(PgBenchExpr**expr_parse_result_p,yyscan_tyyscanner,constchar*message)pg_attribute_noreturn();
144-
externvoidexpr_yyerror_more(yyscan_tyyscanner,constchar*message,
145-
constchar*more)pg_attribute_noreturn();
143+
pg_noreturnexternvoidexpr_yyerror(PgBenchExpr**expr_parse_result_p,yyscan_tyyscanner,constchar*message);
144+
pg_noreturnexternvoidexpr_yyerror_more(yyscan_tyyscanner,constchar*message,
145+
constchar*more);
146146
externboolexpr_lex_one_word(PsqlScanStatestate,PQExpBufferword_buf,
147147
int*offset);
148148
externyyscan_texpr_scanner_init(PsqlScanStatestate,
@@ -153,9 +153,9 @@ extern char *expr_scanner_get_substring(PsqlScanState state,
153153
intstart_offset,
154154
boolchomp);
155155

156-
externvoidsyntax_error(constchar*source,intlineno,constchar*line,
157-
constchar*command,constchar*msg,
158-
constchar*more,intcolumn)pg_attribute_noreturn();
156+
pg_noreturnexternvoidsyntax_error(constchar*source,intlineno,constchar*line,
157+
constchar*command,constchar*msg,
158+
constchar*more,intcolumn);
159159

160160
externboolstrtoint64(constchar*str,boolerrorOK,int64*result);
161161
externboolstrtodouble(constchar*str,boolerrorOK,double*dv);

‎src/common/parse_manifest.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ static void json_manifest_finalize_wal_range(JsonManifestParseState *parse);
114114
staticvoidverify_manifest_checksum(JsonManifestParseState*parse,
115115
constchar*buffer,size_tsize,
116116
pg_cryptohash_ctx*incr_ctx);
117-
staticvoidjson_manifest_parse_failure(JsonManifestParseContext*context,
118-
char*msg);
117+
pg_noreturnstaticvoidjson_manifest_parse_failure(JsonManifestParseContext*context,
118+
char*msg);
119119

120120
staticinthexdecode_char(charc);
121121
staticboolhexdecode_string(uint8*result,char*input,intnbytes);
@@ -889,6 +889,7 @@ static void
889889
json_manifest_parse_failure(JsonManifestParseContext*context,char*msg)
890890
{
891891
context->error_cb(context,"could not parse backup manifest: %s",msg);
892+
pg_unreachable();
892893
}
893894

894895
/*

‎src/include/bootstrap/bootstrap.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ extern PGDLLIMPORT Form_pg_attribute attrtypes[MAXATTR];
3333
externPGDLLIMPORTintnumattr;
3434

3535

36-
externvoidBootstrapModeMain(intargc,char*argv[],boolcheck_only)pg_attribute_noreturn();
36+
pg_noreturnexternvoidBootstrapModeMain(intargc,char*argv[],boolcheck_only);
3737

3838
externvoidcloserel(char*relname);
3939
externvoidboot_openrel(char*relname);
@@ -64,6 +64,6 @@ typedef void *yyscan_t;
6464
externintboot_yyparse(yyscan_tyyscanner);
6565
externintboot_yylex_init(yyscan_t*yyscannerp);
6666
externintboot_yylex(unionYYSTYPE*yylval_param,yyscan_tyyscanner);
67-
externvoidboot_yyerror(yyscan_tyyscanner,constchar*message)pg_attribute_noreturn();
67+
pg_noreturnexternvoidboot_yyerror(yyscan_tyyscanner,constchar*message);
6868

6969
#endif/* BOOTSTRAP_H */

‎src/include/c.h

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,26 @@
145145
#definepg_nodiscard
146146
#endif
147147

148+
/*
149+
* pg_noreturn corresponds to the C11 noreturn/_Noreturn function specifier.
150+
* We can't use the standard name "noreturn" because some third-party code
151+
* uses __attribute__((noreturn)) in headers, which would get confused if
152+
* "noreturn" is defined to "_Noreturn", as is done by <stdnoreturn.h>.
153+
*
154+
* In a declaration, function specifiers go before the function name. The
155+
* common style is to put them before the return type. (The MSVC fallback has
156+
* the same requirement. The GCC fallback is more flexible.)
157+
*/
158+
#if defined(__STDC_VERSION__)&&__STDC_VERSION__ >=201112L
159+
#definepg_noreturn _Noreturn
160+
#elif defined(__GNUC__)|| defined(__SUNPRO_C)
161+
#definepg_noreturn __attribute__((noreturn))
162+
#elif defined(_MSC_VER)
163+
#definepg_noreturn __declspec(noreturn)
164+
#else
165+
#definepg_noreturn
166+
#endif
167+
148168
/*
149169
* This macro will disable address safety instrumentation for a function
150170
* when running with "-fsanitize=address". Think twice before using this!
@@ -213,30 +233,24 @@
213233
#definepg_attribute_printf(f,a)
214234
#endif
215235

216-
/* GCC and Sunpro support aligned, packedandnoreturn */
236+
/* GCC and Sunpro support alignedandpacked */
217237
#if defined(__GNUC__)|| defined(__SUNPRO_C)
218238
#definepg_attribute_aligned(a) __attribute__((aligned(a)))
219-
#definepg_attribute_noreturn() __attribute__((noreturn))
220239
#definepg_attribute_packed() __attribute__((packed))
221-
#defineHAVE_PG_ATTRIBUTE_NORETURN 1
222240
#elif defined(_MSC_VER)
223241
/*
224-
* MSVC supports aligned. noreturn is also possible but in MSVC it is
225-
* declared before the definition while pg_attribute_noreturn() macro
226-
* is currently used after the definition.
242+
* MSVC supports aligned.
227243
*
228244
* Packing is also possible but only by wrapping the entire struct definition
229245
* which doesn't fit into our current macro declarations.
230246
*/
231247
#definepg_attribute_aligned(a) __declspec(align(a))
232-
#definepg_attribute_noreturn()
233248
#else
234249
/*
235250
* NB: aligned and packed are not given default definitions because they
236251
* affect code functionality; they *must* be implemented by the compiler
237252
* if they are to be used.
238253
*/
239-
#definepg_attribute_noreturn()
240254
#endif
241255

242256
/*
@@ -858,8 +872,8 @@ typedef NameData *Name;
858872
* we should declare it as long as !FRONTEND.
859873
*/
860874
#ifndefFRONTEND
861-
externvoidExceptionalCondition(constchar*conditionName,
862-
constchar*fileName,intlineNumber)pg_attribute_noreturn();
875+
pg_noreturnexternvoidExceptionalCondition(constchar*conditionName,
876+
constchar*fileName,intlineNumber);
863877
#endif
864878

865879
/*

‎src/include/commands/defrem.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,6 @@ extern List *defGetQualifiedName(DefElem *def);
160160
externTypeName*defGetTypeName(DefElem*def);
161161
externintdefGetTypeLength(DefElem*def);
162162
externList*defGetStringList(DefElem*def);
163-
externvoiderrorConflictingDefElem(DefElem*defel,ParseState*pstate)pg_attribute_noreturn();
163+
pg_noreturnexternvoiderrorConflictingDefElem(DefElem*defel,ParseState*pstate);
164164

165165
#endif/* DEFREM_H */

‎src/include/common/parse_manifest.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ typedef void (*json_manifest_per_wal_range_callback) (JsonManifestParseContext *
3434
TimeLineIDtli,
3535
XLogRecPtrstart_lsn,XLogRecPtrend_lsn);
3636
typedefvoid (*json_manifest_error_callback) (JsonManifestParseContext*,
37-
constchar*fmt,...)pg_attribute_printf(2,3)
38-
pg_attribute_noreturn();
37+
constchar*fmt,...)pg_attribute_printf(2,3);
3938

4039
structJsonManifestParseContext
4140
{

‎src/include/mb/pg_wchar.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -768,9 +768,9 @@ extern void check_encoding_conversion_args(int src_encoding,
768768
intexpected_src_encoding,
769769
intexpected_dest_encoding);
770770

771-
externvoidreport_invalid_encoding(intencoding,constchar*mbstr,intlen)pg_attribute_noreturn();
772-
externvoidreport_untranslatable_char(intsrc_encoding,intdest_encoding,
773-
constchar*mbstr,intlen)pg_attribute_noreturn();
771+
pg_noreturnexternvoidreport_invalid_encoding(intencoding,constchar*mbstr,intlen);
772+
pg_noreturnexternvoidreport_untranslatable_char(intsrc_encoding,intdest_encoding,
773+
constchar*mbstr,intlen);
774774

775775
externintlocal2local(constunsignedchar*l,unsignedchar*p,intlen,
776776
intsrc_encoding,intdest_encoding,

‎src/include/parser/parse_relation.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ extern bool isLockedRefname(ParseState *pstate, const char *refname);
110110
externvoidaddNSItemToQuery(ParseState*pstate,ParseNamespaceItem*nsitem,
111111
booladdToJoinList,
112112
booladdToRelNameSpace,booladdToVarNameSpace);
113-
externvoiderrorMissingRTE(ParseState*pstate,RangeVar*relation)pg_attribute_noreturn();
114-
externvoiderrorMissingColumn(ParseState*pstate,
115-
constchar*relname,constchar*colname,intlocation)pg_attribute_noreturn();
113+
pg_noreturnexternvoiderrorMissingRTE(ParseState*pstate,RangeVar*relation);
114+
pg_noreturnexternvoiderrorMissingColumn(ParseState*pstate,
115+
constchar*relname,constchar*colname,intlocation);
116116
externvoidexpandRTE(RangeTblEntry*rte,intrtindex,intsublevels_up,
117117
VarReturningTypereturning_type,
118118
intlocation,boolinclude_dropped,

‎src/include/parser/scanner.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,6 @@ extern void setup_scanner_errposition_callback(ScannerCallbackState *scbstate,
145145
core_yyscan_tyyscanner,
146146
intlocation);
147147
externvoidcancel_scanner_errposition_callback(ScannerCallbackState*scbstate);
148-
externvoidscanner_yyerror(constchar*message,core_yyscan_tyyscanner)pg_attribute_noreturn();
148+
pg_noreturnexternvoidscanner_yyerror(constchar*message,core_yyscan_tyyscanner);
149149

150150
#endif/* SCANNER_H */

‎src/include/postmaster/autovacuum.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ extern void autovac_init(void);
5858
/* called from postmaster when a worker could not be forked */
5959
externvoidAutoVacWorkerFailed(void);
6060

61-
externvoidAutoVacLauncherMain(constvoid*startup_data,size_tstartup_data_len)pg_attribute_noreturn();
62-
externvoidAutoVacWorkerMain(constvoid*startup_data,size_tstartup_data_len)pg_attribute_noreturn();
61+
pg_noreturnexternvoidAutoVacLauncherMain(constvoid*startup_data,size_tstartup_data_len);
62+
pg_noreturnexternvoidAutoVacWorkerMain(constvoid*startup_data,size_tstartup_data_len);
6363

6464
externboolAutoVacuumRequestWork(AutoVacuumWorkItemTypetype,
6565
OidrelationId,BlockNumberblkno);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp