From b4f52bfa373dc0bf1a4a65b29a0bcc63adda6145 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Wed, 3 Apr 2013 11:38:05 -0400 Subject: [PATCH] Possibly fix compiler warnings, simplify SDLTest_SurfaceImage_t definition. --- include/SDL_test_images.h | 6 +----- test/automated/common/common.h | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/include/SDL_test_images.h b/include/SDL_test_images.h index 5730cca88..7917b3abc 100644 --- a/include/SDL_test_images.h +++ b/include/SDL_test_images.h @@ -53,11 +53,7 @@ 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 + const unsigned char *pixel_data; } SDLTest_SurfaceImage_t; /* Test images */ diff --git a/test/automated/common/common.h b/test/automated/common/common.h index d80d8186e..d5e7324f5 100644 --- a/test/automated/common/common.h +++ b/test/automated/common/common.h @@ -22,7 +22,7 @@ typedef struct SurfaceImage_s { 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