Patched test apps to compile with C89 compilers (thanks, Axel!).
authorRyan C. Gordon <icculus@icculus.org>
Fri, 29 Mar 2013 21:21:48 -0400
changeset 7034 3a5a53435ebd
parent 7033 3b12bae22f9e
child 7035 c18daa241a02
Patched test apps to compile with C89 compilers (thanks, Axel!). Fixes Bugzilla #1772.
test/testaudioinfo.c
test/testwm2.c
--- a/test/testaudioinfo.c	Fri Mar 29 21:16:30 2013 -0400
+++ b/test/testaudioinfo.c	Fri Mar 29 21:21:48 2013 -0400
@@ -36,6 +36,8 @@
 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 @@
     }
 
     /* Print available audio drivers */
-    int n = SDL_GetNumAudioDrivers();
+    n = SDL_GetNumAudioDrivers();
     if (n == 0) {
         printf("No built-in audio drivers\n\n");
     } else {
--- a/test/testwm2.c	Fri Mar 29 21:16:30 2013 -0400
+++ b/test/testwm2.c	Fri Mar 29 21:21:48 2013 -0400
@@ -42,13 +42,14 @@
         "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) {