]> granicus.if.org Git - postgresql/commitdiff
Suppress compiler warnings about "value computed is not used".
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 12 Apr 2011 06:05:24 +0000 (02:05 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 12 Apr 2011 06:05:24 +0000 (02:05 -0400)
The recent patch to remove gcc 4.6 warnings created some new ones, at
least on my rather old gcc version.  Try to make everybody happy by
casting to "void" when we just want to discard the result.

src/interfaces/ecpg/ecpglib/descriptor.c

index aecf11c65884224c2a41f710fea42c515c6fed56..5f56de031202aa9e2d09fa9a07fd1e41bdcd9d31 100644 (file)
@@ -775,16 +775,16 @@ ECPGdescribe(int line, int compat, bool input, const char *connection_name, cons
 
                /* rest of variable parameters */
                ptr = va_arg(args, void *);
-               va_arg(args, long);             /* skip args */
-               va_arg(args, long);
-               va_arg(args, long);
+               (void) va_arg(args, long);              /* skip args */
+               (void) va_arg(args, long);
+               (void) va_arg(args, long);
 
                /* variable indicator */
-               va_arg(args, enum ECPGttype);
-               va_arg(args, void *);   /* skip args */
-               va_arg(args, long);
-               va_arg(args, long);
-               va_arg(args, long);
+               (void) va_arg(args, enum ECPGttype);
+               (void) va_arg(args, void *);    /* skip args */
+               (void) va_arg(args, long);
+               (void) va_arg(args, long);
+               (void) va_arg(args, long);
 
                switch (type)
                {