Fixed compiler warnings in test programs.
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>
Sat, 13 Jul 2013 21:13:09 +0200
changeset 7437964e8876ad3b
parent 7436 10163e41e563
child 7438 97c35b3811d1
Fixed compiler warnings in test programs.
test/testiconv.c
test/testintersections.c
test/testloadso.c
test/testrumble.c
     1.1 --- a/test/testiconv.c	Sat Jul 13 21:06:56 2013 +0200
     1.2 +++ b/test/testiconv.c	Sat Jul 13 21:13:09 2013 +0200
     1.3 @@ -45,7 +45,7 @@
     1.4      char buffer[BUFSIZ];
     1.5      char *ucs4;
     1.6      char *test[2];
     1.7 -    int i, index = 0;
     1.8 +    int i;
     1.9      FILE *file;
    1.10      int errors = 0;
    1.11  
     2.1 --- a/test/testintersections.c	Sat Jul 13 21:06:56 2013 +0200
     2.2 +++ b/test/testintersections.c	Sat Jul 13 21:13:09 2013 +0200
     2.3 @@ -98,7 +98,6 @@
     2.4  DrawLines(SDL_Renderer * renderer)
     2.5  {
     2.6      int i;
     2.7 -    int x1, y1, x2, y2;
     2.8      SDL_Rect viewport;
     2.9  
    2.10      /* Query the sizes */
     3.1 --- a/test/testloadso.c	Sat Jul 13 21:06:56 2013 +0200
     3.2 +++ b/test/testloadso.c	Sat Jul 13 21:13:09 2013 +0200
     3.3 @@ -78,5 +78,5 @@
     3.4          SDL_UnloadObject(lib);
     3.5      }
     3.6      SDL_Quit();
     3.7 -    return (0);
     3.8 +    return retval;
     3.9  }
     4.1 --- a/test/testrumble.c	Sat Jul 13 21:06:56 2013 +0200
     4.2 +++ b/test/testrumble.c	Sat Jul 13 21:13:09 2013 +0200
     4.3 @@ -50,10 +50,6 @@
     4.4      int i;
     4.5      char *name;
     4.6      int index;
     4.7 -    SDL_HapticEffect efx[5];
     4.8 -    int id[5];
     4.9 -    int nefx;
    4.10 -    unsigned int supported;
    4.11  
    4.12      name = NULL;
    4.13      index = -1;
    4.14 @@ -130,7 +126,7 @@
    4.15      SDL_HapticRumbleStop(haptic);
    4.16      SDL_Delay(2000);
    4.17      printf("Playing 2 second rumble at 0.3 magnitude.\n");
    4.18 -    if (SDL_HapticRumblePlay(haptic, 0.3, 5000) != 0) {
    4.19 +    if (SDL_HapticRumblePlay(haptic, 0.3f, 5000) != 0) {
    4.20         printf("\nFailed to play rumble: %s\n", SDL_GetError() );
    4.21         return 1;
    4.22      }