[Python-checkins] CVS: python/dist/src/Python errors.c,2.56,2.57

Fred L. Drake python-dev@python.org
Tue, 10 Oct 2000 14:10:38 -0700


Update of /cvsroot/python/python/dist/src/Python
In directory slayer.i.sourceforge.net:/tmp/cvs-serv3759

Modified Files:
	errors.c 
Log Message:

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>.


Index: errors.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/errors.c,v
retrieving revision 2.56
retrieving revision 2.57
diff -C2 -r2.56 -r2.57
*** errors.c	2000/09/01 23:29:28	2.56
--- errors.c	2000/10/10 21:10:35	2.57
***************
*** 407,411 ****
  			switch (*f) {
  			case 'c':
! 				va_arg(vargs, int);
  				/* fall through... */
  			case '%':
--- 407,411 ----
  			switch (*f) {
  			case 'c':
! 				(void) va_arg(vargs, int);
  				/* fall through... */
  			case '%':
***************
*** 413,417 ****
  				break;
  			case 'd': case 'i': case 'x':
! 				va_arg(vargs, int);
  				/* 20 bytes should be enough to hold a 64-bit
  				   integer */
--- 413,417 ----
  				break;
  			case 'd': case 'i': case 'x':
! 				(void) va_arg(vargs, int);
  				/* 20 bytes should be enough to hold a 64-bit
  				   integer */