From f1747066206259ffa37fae0e174e0b9f56ace568 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 8 Dec 2005 14:21:17 +0000 Subject: [PATCH] Fixed compile warnings with gcc 4 --- src/video/SDL_blit.c | 4 ++-- src/video/x11/SDL_x11events.c | 2 +- src/video/x11/SDL_x11gl.c | 2 +- src/video/x11/SDL_x11modes.c | 2 +- src/video/x11/SDL_x11yuv.c | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/video/SDL_blit.c b/src/video/SDL_blit.c index 9d7b11b68..994e55416 100644 --- a/src/video/SDL_blit.c +++ b/src/video/SDL_blit.c @@ -116,7 +116,7 @@ static int SDL_SoftBlit(SDL_Surface *src, SDL_Rect *srcrect, } #ifdef MMX_ASMBLIT -static __inline__ void SDL_memcpyMMX(char* to,char* from,int len) +static __inline__ void SDL_memcpyMMX(Uint8 *to, const Uint8 *from, int len) { int i; @@ -132,7 +132,7 @@ static __inline__ void SDL_memcpyMMX(char* to,char* from,int len) SDL_memcpy(to, from, len&7); } -static __inline__ void SDL_memcpySSE(char* to,char* from,int len) +static __inline__ void SDL_memcpySSE(Uint8 *to, const Uint8 *from, int len) { int i; diff --git a/src/video/x11/SDL_x11events.c b/src/video/x11/SDL_x11events.c index 498d01989..cb778ca4d 100644 --- a/src/video/x11/SDL_x11events.c +++ b/src/video/x11/SDL_x11events.c @@ -613,7 +613,7 @@ void X11_InitKeymap(void) } #ifdef X_HAVE_UTF8_STRING -Uint32 Utf8ToUcs4(const char * utf8) +Uint32 Utf8ToUcs4(const unsigned char *utf8) { Uint32 c; int i = 1; diff --git a/src/video/x11/SDL_x11gl.c b/src/video/x11/SDL_x11gl.c index 0d425c8a3..fe7a4f4e1 100644 --- a/src/video/x11/SDL_x11gl.c +++ b/src/video/x11/SDL_x11gl.c @@ -532,7 +532,7 @@ void *X11_GL_GetProcAddress(_THIS, const char* proc) handle = this->gl_config.dll_handle; if ( this->gl_data->glXGetProcAddress ) { - return this->gl_data->glXGetProcAddress(proc); + return this->gl_data->glXGetProcAddress((const GLubyte *)proc); } #if defined(__OpenBSD__) && !defined(__ELF__) #undef do_dlsym diff --git a/src/video/x11/SDL_x11modes.c b/src/video/x11/SDL_x11modes.c index e4b56bfa5..c8fb993d8 100644 --- a/src/video/x11/SDL_x11modes.c +++ b/src/video/x11/SDL_x11modes.c @@ -49,7 +49,7 @@ static char rcsid = Bool SDL_NAME(XF86VidModeGetModeInfo)(Display *dpy, int scr, SDL_NAME(XF86VidModeModeInfo) *info) { SDL_NAME(XF86VidModeModeLine) *l = (SDL_NAME(XF86VidModeModeLine)*)((char*)info + sizeof info->dotclock); - return SDL_NAME(XF86VidModeGetModeLine)(dpy, scr, &info->dotclock, l); + return SDL_NAME(XF86VidModeGetModeLine)(dpy, scr, (int*)&info->dotclock, l); } #endif /* XFREE86_VM */ diff --git a/src/video/x11/SDL_x11yuv.c b/src/video/x11/SDL_x11yuv.c index e0b3af085..ddf6563f6 100644 --- a/src/video/x11/SDL_x11yuv.c +++ b/src/video/x11/SDL_x11yuv.c @@ -103,8 +103,8 @@ SDL_Overlay *X11_CreateYUVOverlay(_THIS, int width, int height, Uint32 format, S SDL_Overlay *overlay; struct private_yuvhwdata *hwdata; int xv_port; - int i, j, k; - int adaptors; + unsigned int i, j, k; + unsigned int adaptors; SDL_NAME(XvAdaptorInfo) *ainfo; int bpp; #ifndef NO_SHARED_MEMORY