Skip to content

Commit 39bfc94

Browse files
committed
Suppress compiler warnings in readfuncs.c.
Commit 7357558 introduced "(void) token;" into the READ_TEMP_LOCALS() macro, to suppress complaints from gcc 4.6 when the value of token was not used anywhere in a particular node-read function. However, this just moved the warning around: inspection of buildfarm results shows that some compilers are now complaining that token is being read before it's set. Revert the READ_TEMP_LOCALS() macro change and instead put "(void) token;" into READ_NODE_FIELD(), which is the principal culprit for cases where the warning might occur. In principle we might 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, so I'll leave them alone for now.
1 parent fa188b5 commit 39bfc94

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
#define READ_TEMP_LOCALS() \
5050
char *token; \
51-
int length; \
52-
(void) token /* possibly unused */
51+
int length
5352

5453
/* ... but most need both */
5554
#define READ_LOCALS(nodeTypeName) \
@@ -113,6 +112,7 @@
113112
/* Read a Node field */
114113
#define READ_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)
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