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

Commita376960

Browse files
committed
Suppress compiler warning for get_am_type_string().
Compilers that don't know that elog(ERROR) doesn't return complainedthat this function might fail to return a value. Per buildfarm.While at it, const-ify the function's declaration, since the intentis evidently to always return a constant string.
1 parent0ecd3fe commita376960

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎src/backend/commands/amcmds.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131

3232
staticOidlookup_index_am_handler_func(List*handler_name,charamtype);
33-
staticchar*get_am_type_string(charamtype);
33+
staticconstchar*get_am_type_string(charamtype);
3434

3535

3636
/*
@@ -217,9 +217,9 @@ get_am_name(Oid amOid)
217217
}
218218

219219
/*
220-
* Convert single charater access method type into string for error reporting.
220+
* Convert single-character access method type into string for error reporting.
221221
*/
222-
staticchar*
222+
staticconstchar*
223223
get_am_type_string(charamtype)
224224
{
225225
switch (amtype)
@@ -229,6 +229,7 @@ get_am_type_string(char amtype)
229229
default:
230230
/* shouldn't happen */
231231
elog(ERROR,"invalid access method type '%c'",amtype);
232+
returnNULL;/* keep compiler quiet */
232233
}
233234
}
234235

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp