Fixed type-punning issue (casting to char* makes GCC strict-aliasing happy). SDL-1.2
authorRyan C. Gordon <icculus@icculus.org>
Wed, 16 Nov 2011 21:12:47 -0500
branchSDL-1.2
changeset 6083 5f85dce0d4fc
parent 6082 3d4488ae2e24
child 6084 2085129e7eab
Fixed type-punning issue (casting to char* makes GCC strict-aliasing happy).
src/video/dga/SDL_dgavideo.c
--- a/src/video/dga/SDL_dgavideo.c	Wed Nov 16 21:10:03 2011 -0500
+++ b/src/video/dga/SDL_dgavideo.c	Wed Nov 16 21:12:47 2011 -0500
@@ -651,7 +651,7 @@
 	surfaces.base = screen->pixels;
 	surfaces.size = (unsigned int)((long)base - (long)surfaces.base);
 	surfaces.next = bucket;
-	screen->hwdata = (struct private_hwdata *)&surfaces;
+	screen->hwdata = (struct private_hwdata *)((char*)&surfaces);
 	return(0);
 }
 static void DGA_FreeHWSurfaces(_THIS)