From 2d97db998bbcdb2faafc1bda880ad42da57c2e21 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Fri, 28 Dec 2012 20:01:41 -0500 Subject: [PATCH] Better compiler warning fix for gcc2. --- include/SDL_test_images.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/SDL_test_images.h b/include/SDL_test_images.h index a57e6e4c5..4aea85420 100644 --- a/include/SDL_test_images.h +++ b/include/SDL_test_images.h @@ -53,7 +53,11 @@ typedef struct SDLTest_SurfaceImage_s { 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 } SDLTest_SurfaceImage_t; /* Test images */