include/SDL_stdinc.h
branchSDL-1.2
changeset 4283 cd511a8560b7
parent 4233 48e63c07bbbf
child 4303 9f66052ebb81
     1.1 --- a/include/SDL_stdinc.h	Thu Oct 08 07:09:04 2009 +0000
     1.2 +++ b/include/SDL_stdinc.h	Thu Oct 08 07:45:55 2009 +0000
     1.3 @@ -266,7 +266,7 @@
     1.4  		"cld\n\t"					\
     1.5  		"rep ; stosl\n\t"				\
     1.6  		: "=&D" (u0), "=&a" (u1), "=&c" (u2)		\
     1.7 -		: "0" (dst), "1" (val), "2" ((Uint32)(len))	\
     1.8 +		: "0" (dst), "1" (val), "2" (SDL_static_cast(Uint32, len))	\
     1.9  		: "memory" );					\
    1.10  } while(0)
    1.11  #endif
    1.12 @@ -275,7 +275,7 @@
    1.13  do {						\
    1.14  	unsigned _count = (len);		\
    1.15  	unsigned _n = (_count + 3) / 4;		\
    1.16 -	Uint32 *_p = (Uint32 *)(dst);		\
    1.17 +	Uint32 *_p = SDL_static_cast(Uint32 *, dst);	\
    1.18  	Uint32 _val = (val);			\
    1.19  	if (len == 0) break;			\
    1.20          switch (_count % 4) {			\
    1.21 @@ -306,7 +306,7 @@
    1.22  		"movsb\n"						  \
    1.23  		"2:"							  \
    1.24  		: "=&c" (u0), "=&D" (u1), "=&S" (u2)			  \
    1.25 -		: "0" ((unsigned)(len)/4), "q" (len), "1" (dst),"2" (src) \
    1.26 +		: "0" (SDL_static_cast(unsigned, len)/4), "q" (len), "1" (dst),"2" (src) \
    1.27  		: "memory" );						  \
    1.28  } while(0)
    1.29  #endif
    1.30 @@ -331,7 +331,7 @@
    1.31  		"cld\n\t"					\
    1.32  		"rep ; movsl"					\
    1.33  		: "=&c" (ecx), "=&D" (edi), "=&S" (esi)		\
    1.34 -		: "0" ((unsigned)(len)), "1" (dst), "2" (src)	\
    1.35 +		: "0" (SDL_static_cast(unsigned, len)), "1" (dst), "2" (src)	\
    1.36  		: "memory" );					\
    1.37  } while(0)
    1.38  #endif
    1.39 @@ -343,8 +343,8 @@
    1.40  #define SDL_revcpy(dst, src, len)			\
    1.41  do {							\
    1.42  	int u0, u1, u2;					\
    1.43 -	char *dstp = (char *)(dst);			\
    1.44 -	char *srcp = (char *)(src);			\
    1.45 +	char *dstp = SDL_static_cast(char *, dst);	\
    1.46 +	char *srcp = SDL_static_cast(char *, src);	\
    1.47  	int n = (len);					\
    1.48  	if ( n >= 4 ) {					\
    1.49  	__asm__ __volatile__ (				\