From 06ebb8c15220413a08dfb4f1b7a64914cc155520 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Fri, 29 Mar 2013 21:21:48 -0400 Subject: [PATCH] Patched test apps to compile with C89 compilers (thanks, Axel!). Fixes Bugzilla #1772. --- test/testaudioinfo.c | 4 +++- test/testwm2.c | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/test/testaudioinfo.c b/test/testaudioinfo.c index ac3191a52..ff7c25b7f 100644 --- a/test/testaudioinfo.c +++ b/test/testaudioinfo.c @@ -36,6 +36,8 @@ print_devices(int iscapture) int main(int argc, char **argv) { + int n; + /* Load the SDL library */ if (SDL_Init(SDL_INIT_AUDIO) < 0) { fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError()); @@ -43,7 +45,7 @@ main(int argc, char **argv) } /* Print available audio drivers */ - int n = SDL_GetNumAudioDrivers(); + n = SDL_GetNumAudioDrivers(); if (n == 0) { printf("No built-in audio drivers\n\n"); } else { diff --git a/test/testwm2.c b/test/testwm2.c index 8f1897403..bdc484ec3 100644 --- a/test/testwm2.c +++ b/test/testwm2.c @@ -42,13 +42,14 @@ main(int argc, char *argv[]) "NO", "hand", }; - SDL_assert(SDL_arraysize(cursorNames) == SDL_NUM_SYSTEM_CURSORS); int i, done; SDL_Event event; int system_cursor = -1; SDL_Cursor *cursor = NULL; + SDL_assert(SDL_arraysize(cursorNames) == SDL_NUM_SYSTEM_CURSORS); + /* Initialize test framework */ state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO); if (!state) {