stdarg.h

Peter Naulls peter at chocky.org
Thu Jan 31 12:51:13 PST 2002


Void casts to avoid alignment warnings.

RCS file: /usr/local/cvsroot/gccsdk/unixlib/source/clib/stdarg.h,v
retrieving revision 1.2.2.1
diff -u -r1.2.2.1 stdarg.h
--- clib/stdarg.h       2001/09/14 14:01:17     1.2.2.1
+++ clib/stdarg.h       2002/01/31 20:50:17
@@ -22,8 +22,8 @@
 
 #define va_start(a,p)  ((void)((a) = ((char *)(&(p)) + va_align(sizeof(p)))))
 #define va_arg(a,t)    ((sizeof(t) > sizeof(int)) ? \
-       *(t *)(((a) += va_align(sizeof(t))) - va_align(sizeof(t))) : \
-       (t)(*(int *)(((a) += sizeof(int)) - sizeof(int))))
+       *(t *)(void *)(((a) += va_align(sizeof(t))) - va_align(sizeof(t))) : \
+       (t)(*(int *)(void *)(((a) += sizeof(int)) - sizeof(int))))
 #define va_end(a)      ((void)((a) = (char *)-1))
 #define va_copy(dest, src) (dest) = (src)


-- 
------------------------------------------------------------------------
 Peter Naulls - peter at chocky.org
 RISC OS Projects Initiative  -  http://www.chocky.org/initiative/
 Java for RISC OS and ARM     -  http://www.chocky.org/java/
 Debian Linux on RiscPCs      -  http://www.chocky.org/debian/
------------------------------------------------------------------------



More information about the gcc mailing list