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 70343a5a53435ebd
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
     1.1 --- a/test/testaudioinfo.c	Fri Mar 29 21:16:30 2013 -0400
     1.2 +++ b/test/testaudioinfo.c	Fri Mar 29 21:21:48 2013 -0400
     1.3 @@ -36,6 +36,8 @@
     1.4  int
     1.5  main(int argc, char **argv)
     1.6  {
     1.7 +    int n;
     1.8 +
     1.9      /* Load the SDL library */
    1.10      if (SDL_Init(SDL_INIT_AUDIO) < 0) {
    1.11          fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError());
    1.12 @@ -43,7 +45,7 @@
    1.13      }
    1.14  
    1.15      /* Print available audio drivers */
    1.16 -    int n = SDL_GetNumAudioDrivers();
    1.17 +    n = SDL_GetNumAudioDrivers();
    1.18      if (n == 0) {
    1.19          printf("No built-in audio drivers\n\n");
    1.20      } else {
     2.1 --- a/test/testwm2.c	Fri Mar 29 21:16:30 2013 -0400
     2.2 +++ b/test/testwm2.c	Fri Mar 29 21:21:48 2013 -0400
     2.3 @@ -42,13 +42,14 @@
     2.4          "NO",
     2.5          "hand",
     2.6      };
     2.7 -    SDL_assert(SDL_arraysize(cursorNames) == SDL_NUM_SYSTEM_CURSORS);
     2.8  
     2.9      int i, done;
    2.10      SDL_Event event;
    2.11      int system_cursor = -1;
    2.12      SDL_Cursor *cursor = NULL;
    2.13  
    2.14 +    SDL_assert(SDL_arraysize(cursorNames) == SDL_NUM_SYSTEM_CURSORS);
    2.15 +
    2.16      /* Initialize test framework */
    2.17      state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO);
    2.18      if (!state) {