Warning fixes.

diff --git a/dlls/ddraw/device_opengl.c b/dlls/ddraw/device_opengl.c
index cdced47..e0ebbf1 100644
--- a/dlls/ddraw/device_opengl.c
+++ b/dlls/ddraw/device_opengl.c
@@ -377,7 +377,7 @@
     return cb(interface_name, device_name, &ddesc, context);
 }
 
-ULONG WINAPI
+static ULONG WINAPI
 GL_IDirect3DDeviceImpl_7_3T_2T_1T_Release(LPDIRECT3DDEVICE7 iface)
 {
     ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice7, iface);
@@ -692,7 +692,7 @@
     return enum_texture_format_OpenGL(lpD3DEnumTextureProc, NULL, lpArg, This->version);
 }
 
-HRESULT WINAPI
+static HRESULT WINAPI
 GL_IDirect3DDeviceImpl_7_3T_EnumTextureFormats(LPDIRECT3DDEVICE7 iface,
 					       LPD3DENUMPIXELFORMATSCALLBACK lpD3DEnumPixelProc,
 					       LPVOID lpArg)
@@ -702,7 +702,7 @@
     return enum_texture_format_OpenGL(NULL, lpD3DEnumPixelProc, lpArg, This->version);
 }
 
-HRESULT WINAPI
+static HRESULT WINAPI
 GL_IDirect3DDeviceImpl_7_3T_2T_SetRenderState(LPDIRECT3DDEVICE7 iface,
 					      D3DRENDERSTATETYPE dwRenderStateType,
 					      DWORD dwRenderState)
@@ -717,7 +717,7 @@
     return DD_OK;
 }
 
-HRESULT WINAPI
+static HRESULT WINAPI
 GL_IDirect3DDeviceImpl_7_3T_2T_GetRenderState(LPDIRECT3DDEVICE7 iface,
 					      D3DRENDERSTATETYPE dwRenderStateType,
 					      LPDWORD lpdwRenderState)
@@ -733,7 +733,7 @@
     return DD_OK;
 }
 
-HRESULT WINAPI
+static HRESULT WINAPI
 GL_IDirect3DDeviceImpl_3_2T_GetLightState(LPDIRECT3DDEVICE3 iface,
 					  D3DLIGHTSTATETYPE dwLightStateType,
 					  LPDWORD lpdwLightState)
@@ -784,7 +784,7 @@
     return DD_OK;
 }
 
-HRESULT WINAPI
+static HRESULT WINAPI
 GL_IDirect3DDeviceImpl_3_2T_SetLightState(LPDIRECT3DDEVICE3 iface,
 					  D3DLIGHTSTATETYPE dwLightStateType,
 					  DWORD dwLightState)
@@ -2401,7 +2401,7 @@
     return DD_OK;
 }
 
-HRESULT WINAPI
+static HRESULT WINAPI
 GL_IDirect3DDeviceImpl_7_GetCaps(LPDIRECT3DDEVICE7 iface,
 				 LPD3DDEVICEDESC7 lpD3DHELDevDesc)
 {
@@ -2630,7 +2630,7 @@
     return D3D_OK;
 }
 
-HRESULT WINAPI
+static HRESULT WINAPI
 GL_IDirect3DDeviceImpl_7_SetViewport(LPDIRECT3DDEVICE7 iface,
 				     LPD3DVIEWPORT7 lpData)
 {
@@ -3035,7 +3035,7 @@
     if (dwFlags & DDBLT_COLORFILL) {
         /* This is easy to handle for the D3D Device... */
         DWORD color;
-        GLenum prev_draw;
+        GLint prev_draw;
         
         /* The color as given in the Blt function is in the format of the frame-buffer...
          * 'clear' expect it in ARGB format => we need to do some conversion :-)
@@ -3110,7 +3110,7 @@
 		/* Both are 3D devices and using the same GL device and the Blt is without color-keying */
 		D3DRECT src_rect;
 		int width, height;
-		GLenum prev_draw;
+		GLint prev_draw;
 		WINE_GL_BUFFER_TYPE src_buffer_type;
 		IDirect3DDeviceGLImpl *gl_d3d_dev = (IDirect3DDeviceGLImpl *) This->d3ddevice;
 		BOOLEAN initial;
@@ -3231,7 +3231,7 @@
 		   (this prevents calling glReadPixels) */
 		D3DRECT src_rect;
 		int width, height;
-		GLenum prev_draw;
+		GLint prev_draw;
 		IDirect3DDeviceGLImpl *gl_d3d_dev = (IDirect3DDeviceGLImpl *) This->d3ddevice;
 		BOOLEAN initial;
 		DWORD opt_bitmap;
@@ -3340,7 +3340,7 @@
     IDirectDrawSurfaceImpl *src_impl = ICOM_OBJECT(IDirectDrawSurfaceImpl, IDirectDrawSurface7, src);
     IDirect3DDeviceGLImpl *gl_d3d_dev = (IDirect3DDeviceGLImpl *) This->d3ddevice;
     WINE_GL_BUFFER_TYPE buffer_type;
-    GLenum prev_draw;
+    GLint prev_draw;
     DWORD opt_bitmap;
     BOOLEAN initial;
     int width, height, x, y;
@@ -3944,7 +3944,7 @@
     /* First, check if we need to do anything. For the backbuffer, flushing is done at the next 3D activity. */
     if ((This->lastlocktype & DDLOCK_READONLY) == 0) {
         if (buffer_type == WINE_GL_BUFFER_FRONT) {
-	    GLenum prev_draw;
+	    GLint prev_draw;
 
 	    TRACE(" flushing front buffer immediately on screen.\n");
 	    
diff --git a/dlls/ddraw/surface_dib.c b/dlls/ddraw/surface_dib.c
index 62f5c83..cfb0de6 100644
--- a/dlls/ddraw/surface_dib.c
+++ b/dlls/ddraw/surface_dib.c
@@ -410,8 +410,8 @@
 	int width = ddesc->dwWidth;
 	int height = ddesc->dwHeight;
 	int x,y;
-	char* dst = (char*) ddesc->lpSurface;
-	char* src = (char*) sdesc->lpSurface;
+	unsigned char* dst = (unsigned char*) ddesc->lpSurface;
+	unsigned char* src = (unsigned char*) sdesc->lpSurface;
 	for (x = 0; x < width; x++)
 	    for (y =0; y < height; y++) {
 		DWORD pixel = 0;
@@ -433,8 +433,8 @@
 	int width = ddesc->dwWidth;
 	int height = ddesc->dwHeight;
 	int x,y;
-	char* dst = (char*) ddesc->lpSurface;
-	char* src = (char*) sdesc->lpSurface;
+	unsigned char* dst = (unsigned char*) ddesc->lpSurface;
+	unsigned char* src = (unsigned char*) sdesc->lpSurface;
 	for (x = 0; x < width; x++)
 	    for (y =0; y < height; y++) {
 		DWORD pixel = 0;
@@ -456,8 +456,8 @@
 	int width = ddesc->dwWidth;
 	int height = ddesc->dwHeight;
 	int x,y;
-	char* dst = (char*) ddesc->lpSurface;
-	char* src = (char*) sdesc->lpSurface;
+	unsigned char* dst = (unsigned char*) ddesc->lpSurface;
+	unsigned char* src = (unsigned char*) sdesc->lpSurface;
 	for (x = 0; x < width; x++)
 	    for (y =0; y < height; y++) {
 		DWORD pixel = 0;
diff --git a/dlls/ddraw/texture.c b/dlls/ddraw/texture.c
index 65573c6..90dbf3f 100644
--- a/dlls/ddraw/texture.c
+++ b/dlls/ddraw/texture.c
@@ -340,7 +340,7 @@
     IDirect3DTextureGLImpl *glThis = (IDirect3DTextureGLImpl *) This->tex_private;
 
     if (glThis->dirty_flag == SURFACE_GL) {
-	GLuint cur_tex;
+	GLint cur_tex;
 
 	TRACE(" flushing GL texture back to memory.\n");
 	
@@ -386,7 +386,7 @@
 	    /* This is a blt without color keying... We can use the direct copy. */
 	    RECT rsrc2;
 	    DWORD width, height;
-	    GLuint cur_tex;
+	    GLint cur_tex;
 	    IDirect3DTextureGLImpl *gl_surf_ptr = surf_ptr->tex_private;
 	    int y;
 	    
@@ -542,7 +542,7 @@
     IDirect3DTextureGLImpl *glThis = (IDirect3DTextureGLImpl *) This->tex_private;
 
     if (glThis->dirty_flag == SURFACE_GL) {
-	GLuint cur_tex;
+	GLint cur_tex;
 	
 	TRACE(" flushing GL texture back to memory.\n");