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

Commit39bfc94

Browse files
committed
Suppress compiler warnings in readfuncs.c.
Commit7357558 introduced "(void) token;"into the READ_TEMP_LOCALS() macro, to suppress complaints from gcc 4.6when the value of token was not used anywhere in a particular node-readfunction. However, this just moved the warning around: inspection ofbuildfarm results shows that some compilers are now complaining that tokenis being read before it's set. Revert the READ_TEMP_LOCALS() macro changeand instead put "(void) token;" into READ_NODE_FIELD(), which is theprincipal culprit for cases where the warning might occur. In principle wemight need the same in READ_BITMAPSET_FIELD() and/or READ_LOCATION_FIELD(),but it seems unlikely that a node would consist only of such fields, soI'll leave them alone for now.
1 parentfa188b5 commit39bfc94

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/backend/nodes/readfuncs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@
4848
/* And a few guys need only the pg_strtok support fields */
4949
#defineREAD_TEMP_LOCALS()\
5050
char *token;\
51-
intlength;\
52-
(void) token/* possibly unused */
51+
intlength
5352

5453
/* ... but most need both */
5554
#defineREAD_LOCALS(nodeTypeName)\
@@ -113,6 +112,7 @@
113112
/* Read a Node field */
114113
#defineREAD_NODE_FIELD(fldname) \
115114
token = pg_strtok(&length);/* skip :fldname */ \
115+
(void)token;/* in case not used elsewhere */ \
116116
local_node->fldname=nodeRead(NULL,0)
117117

118118
/* Read a bitmapset field */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp