]> granicus.if.org Git - python/commitdiff
Avoid a couple of "value computed is not used" warnings from gcc -Wall;
authorFred Drake <fdrake@acm.org>
Tue, 10 Oct 2000 21:10:35 +0000 (21:10 +0000)
committerFred Drake <fdrake@acm.org>
Tue, 10 Oct 2000 21:10:35 +0000 (21:10 +0000)
these computations are required for their side effects in traversing the
variable arguments list.

Reported by Marc-Andre Lemburg <mal@lemburg.com>.

Python/errors.c

index ba5879095415cbf5d19950c5fbc68cffb9d14cbd..28dfbbe3f3acff3bc76f4eedf8f80780173e15f6 100644 (file)
@@ -406,13 +406,13 @@ PyErr_Format(PyObject *exception, const char *format, ...)
                                ;
                        switch (*f) {
                        case 'c':
-                               va_arg(vargs, int);
+                               (void) va_arg(vargs, int);
                                /* fall through... */
                        case '%':
                                n++;
                                break;
                        case 'd': case 'i': case 'x':
-                               va_arg(vargs, int);
+                               (void) va_arg(vargs, int);
                                /* 20 bytes should be enough to hold a 64-bit
                                   integer */
                                n = n + 20;