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

Commit7357558

Browse files
committed
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 tovoid, which avoids the warning.
1 parentdbbba52 commit7357558

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

‎src/backend/nodes/read.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ nodeTokenType(char *token, int length)
224224

225225
errno=0;
226226
val=strtol(token,&endptr,10);
227+
(void)val;/* avoid compiler warning if unused */
227228
if (endptr!=token+length||errno==ERANGE
228229
#ifdefHAVE_LONG_INT_64
229230
/* if long > 32 bits, check for overflow of int4 */

‎src/backend/nodes/readfuncs.c

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

5354
/* ... but most need both */
5455
#defineREAD_LOCALS(nodeTypeName)\

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp