]> granicus.if.org Git - postgresql/commitdiff
Suppress Coverity complaints in readfuncs.c.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Thu, 16 Jan 2014 09:55:08 +0000 (11:55 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Thu, 16 Jan 2014 10:00:19 +0000 (12:00 +0200)
Coverity is complaining that the value returned by pg_strtok in
READ_LOCATION_FIELD and READ_BITMAPSET_FIELD macros is not used. In commit
39bfc94c86f1990e9db8ea3da0e82995cc1b76db, we did this to the other macros
to placate compilers that complained when the variable was completely
unused, this extends that to the last remaining macros.

src/backend/nodes/readfuncs.c

index 8a7a662896bcf412cea4296d29ba7442d3152608..c22acd5d271da00e714e7169c18d2ba981c3a0cd 100644 (file)
 #define READ_LOCATION_FIELD(fldname) \
        token = pg_strtok(&length);             /* skip :fldname */ \
        token = pg_strtok(&length);             /* get field value */ \
+       (void) token;                           /* in case not used elsewhere */ \
        local_node->fldname = -1        /* set field to "unknown" */
 
 /* Read a Node field */
 /* Read a bitmapset field */
 #define READ_BITMAPSET_FIELD(fldname) \
        token = pg_strtok(&length);             /* skip :fldname */ \
+       (void) token;                           /* in case not used elsewhere */ \
        local_node->fldname = _readBitmapset()
 
 /* Routine exit */