Fixed compile warnings with gcc 4
authorSam Lantinga <slouken@libsdl.org>
Thu, 08 Dec 2005 14:21:17 +0000
changeset 1196b81f54c3963f
parent 1195 bb6791b0a268
child 1197 bb5ace455586
Fixed compile warnings with gcc 4
src/video/SDL_blit.c
src/video/x11/SDL_x11events.c
src/video/x11/SDL_x11gl.c
src/video/x11/SDL_x11modes.c
src/video/x11/SDL_x11yuv.c
     1.1 --- a/src/video/SDL_blit.c	Tue Dec 06 14:36:39 2005 +0000
     1.2 +++ b/src/video/SDL_blit.c	Thu Dec 08 14:21:17 2005 +0000
     1.3 @@ -116,7 +116,7 @@
     1.4  }
     1.5  
     1.6  #ifdef MMX_ASMBLIT
     1.7 -static __inline__ void SDL_memcpyMMX(char* to,char* from,int len)
     1.8 +static __inline__ void SDL_memcpyMMX(Uint8 *to, const Uint8 *from, int len)
     1.9  {
    1.10  	int i;
    1.11  
    1.12 @@ -132,7 +132,7 @@
    1.13  		SDL_memcpy(to, from, len&7);
    1.14  }
    1.15  
    1.16 -static __inline__ void SDL_memcpySSE(char* to,char* from,int len)
    1.17 +static __inline__ void SDL_memcpySSE(Uint8 *to, const Uint8 *from, int len)
    1.18  {
    1.19  	int i;
    1.20  
     2.1 --- a/src/video/x11/SDL_x11events.c	Tue Dec 06 14:36:39 2005 +0000
     2.2 +++ b/src/video/x11/SDL_x11events.c	Thu Dec 08 14:21:17 2005 +0000
     2.3 @@ -613,7 +613,7 @@
     2.4  }
     2.5  
     2.6  #ifdef X_HAVE_UTF8_STRING
     2.7 -Uint32 Utf8ToUcs4(const char * utf8)
     2.8 +Uint32 Utf8ToUcs4(const unsigned char *utf8)
     2.9  {
    2.10  	Uint32 c;
    2.11  	int i = 1;
     3.1 --- a/src/video/x11/SDL_x11gl.c	Tue Dec 06 14:36:39 2005 +0000
     3.2 +++ b/src/video/x11/SDL_x11gl.c	Thu Dec 08 14:21:17 2005 +0000
     3.3 @@ -532,7 +532,7 @@
     3.4  	
     3.5  	handle = this->gl_config.dll_handle;
     3.6  	if ( this->gl_data->glXGetProcAddress ) {
     3.7 -		return this->gl_data->glXGetProcAddress(proc);
     3.8 +		return this->gl_data->glXGetProcAddress((const GLubyte *)proc);
     3.9  	}
    3.10  #if defined(__OpenBSD__) && !defined(__ELF__)
    3.11  #undef do_dlsym
     4.1 --- a/src/video/x11/SDL_x11modes.c	Tue Dec 06 14:36:39 2005 +0000
     4.2 +++ b/src/video/x11/SDL_x11modes.c	Thu Dec 08 14:21:17 2005 +0000
     4.3 @@ -49,7 +49,7 @@
     4.4  Bool SDL_NAME(XF86VidModeGetModeInfo)(Display *dpy, int scr, SDL_NAME(XF86VidModeModeInfo) *info)
     4.5  {
     4.6      SDL_NAME(XF86VidModeModeLine) *l = (SDL_NAME(XF86VidModeModeLine)*)((char*)info + sizeof info->dotclock);
     4.7 -    return SDL_NAME(XF86VidModeGetModeLine)(dpy, scr, &info->dotclock, l);
     4.8 +    return SDL_NAME(XF86VidModeGetModeLine)(dpy, scr, (int*)&info->dotclock, l);
     4.9  }
    4.10  #endif /* XFREE86_VM */
    4.11  
     5.1 --- a/src/video/x11/SDL_x11yuv.c	Tue Dec 06 14:36:39 2005 +0000
     5.2 +++ b/src/video/x11/SDL_x11yuv.c	Thu Dec 08 14:21:17 2005 +0000
     5.3 @@ -103,8 +103,8 @@
     5.4  	SDL_Overlay *overlay;
     5.5  	struct private_yuvhwdata *hwdata;
     5.6  	int xv_port;
     5.7 -	int i, j, k;
     5.8 -	int adaptors;
     5.9 +	unsigned int i, j, k;
    5.10 +	unsigned int adaptors;
    5.11  	SDL_NAME(XvAdaptorInfo) *ainfo;
    5.12  	int bpp;
    5.13  #ifndef NO_SHARED_MEMORY