Possibly fix compiler warnings, simplify SDLTest_SurfaceImage_t definition.
authorRyan C. Gordon <icculus@icculus.org>
Wed, 03 Apr 2013 11:38:05 -0400
changeset 7051 cf773d8091c7
parent 7050 aa1f44908402
child 7052 1297b81ad473
Possibly fix compiler warnings, simplify SDLTest_SurfaceImage_t definition.
include/SDL_test_images.h
test/automated/common/common.h
--- a/include/SDL_test_images.h	Wed Apr 03 11:34:21 2013 -0400
+++ b/include/SDL_test_images.h	Wed Apr 03 11:38:05 2013 -0400
@@ -53,11 +53,7 @@
   int width;
   int height;
   unsigned int bytes_per_pixel; /* 3:RGB, 4:RGBA */ 
-#if (defined(__GNUC__) && (__GNUC__ <= 2))
-  unsigned char pixel_data[0];
-#else
-  unsigned char pixel_data[];
-#endif
+  const unsigned char *pixel_data;
 } SDLTest_SurfaceImage_t;
 
 /* Test images */
--- a/test/automated/common/common.h	Wed Apr 03 11:34:21 2013 -0400
+++ b/test/automated/common/common.h	Wed Apr 03 11:38:05 2013 -0400
@@ -22,7 +22,7 @@
    int width;
    int height;
    unsigned int  bytes_per_pixel; /* 3:RGB, 4:RGBA */ 
-   const unsigned char pixel_data[];
+   const unsigned char *pixel_data;
 } SurfaceImage_t;
 
 #define ALLOWABLE_ERROR_OPAQUE	0