comparison Python/errors.c @ 15148:a2fcc487b9da legacy-trunk

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 <mal@lemburg.com>.
author Fred Drake <fdrake@acm.org>
date Tue, 10 Oct 2000 21:10:35 +0000
parents 6f6f965c5e2d
children e510c4cc5737 8aa947e1eee8
comparison
equal deleted inserted replaced
15147:5e5b43118c52 15148:a2fcc487b9da
404 const char* p = f; 404 const char* p = f;
405 while (*++f && *f != '%' && !isalpha(*f)) 405 while (*++f && *f != '%' && !isalpha(*f))
406 ; 406 ;
407 switch (*f) { 407 switch (*f) {
408 case 'c': 408 case 'c':
409 va_arg(vargs, int); 409 (void) va_arg(vargs, int);
410 /* fall through... */ 410 /* fall through... */
411 case '%': 411 case '%':
412 n++; 412 n++;
413 break; 413 break;
414 case 'd': case 'i': case 'x': 414 case 'd': case 'i': case 'x':
415 va_arg(vargs, int); 415 (void) va_arg(vargs, int);
416 /* 20 bytes should be enough to hold a 64-bit 416 /* 20 bytes should be enough to hold a 64-bit
417 integer */ 417 integer */
418 n = n + 20; 418 n = n + 20;
419 break; 419 break;
420 case 's': 420 case 's':