Skip to content
Snippets Groups Projects
Commit 7357558f authored by Peter Eisentraut's avatar Peter Eisentraut
Browse files

Avoid compiler warnings due to possibly unused variables

gcc 4.6 complains about these because of the new option
-Wunused-but-set-variable which comes in with -Wall, so cast them to
void, which avoids the warning.
parent dbbba527
No related branches found
No related tags found
No related merge requests found
...@@ -224,6 +224,7 @@ nodeTokenType(char *token, int length) ...@@ -224,6 +224,7 @@ nodeTokenType(char *token, int length)
errno = 0; errno = 0;
val = strtol(token, &endptr, 10); val = strtol(token, &endptr, 10);
(void) val; /* avoid compiler warning if unused */
if (endptr != token + length || errno == ERANGE if (endptr != token + length || errno == ERANGE
#ifdef HAVE_LONG_INT_64 #ifdef HAVE_LONG_INT_64
/* if long > 32 bits, check for overflow of int4 */ /* if long > 32 bits, check for overflow of int4 */
......
...@@ -48,7 +48,8 @@ ...@@ -48,7 +48,8 @@
/* And a few guys need only the pg_strtok support fields */ /* And a few guys need only the pg_strtok support fields */
#define READ_TEMP_LOCALS() \ #define READ_TEMP_LOCALS() \
char *token; \ char *token; \
int length int length; \
(void) token /* possibly unused */
/* ... but most need both */ /* ... but most need both */
#define READ_LOCALS(nodeTypeName) \ #define READ_LOCALS(nodeTypeName) \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment