Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e693df9

Browse files
committed
Avoid a couple of "value computed is not used" warnings from gcc -Wall;
these computations are required for their side effects in traversing the variable arguments list. Reported by Marc-Andre Lemburg <[email protected]>.
1 parent 66c9f07 commit e693df9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Python/errors.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,13 +406,13 @@ PyErr_Format(PyObject *exception, const char *format, ...)
406406
;
407407
switch (*f) {
408408
case 'c':
409-
va_arg(vargs, int);
409+
(void) va_arg(vargs, int);
410410
/* fall through... */
411411
case '%':
412412
n++;
413413
break;
414414
case 'd': case 'i': case 'x':
415-
va_arg(vargs, int);
415+
(void) va_arg(vargs, int);
416416
/* 20 bytes should be enough to hold a 64-bit
417417
integer */
418418
n = n + 20;

0 commit comments

Comments
 (0)