Fixed compiler warnings in test programs.
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>
Sat, 13 Jul 2013 21:13:09 +0200
changeset 7437 964e8876ad3b
parent 7436 10163e41e563
child 7438 97c35b3811d1
Fixed compiler warnings in test programs.
test/testiconv.c
test/testintersections.c
test/testloadso.c
test/testrumble.c
--- a/test/testiconv.c	Sat Jul 13 21:06:56 2013 +0200
+++ b/test/testiconv.c	Sat Jul 13 21:13:09 2013 +0200
@@ -45,7 +45,7 @@
     char buffer[BUFSIZ];
     char *ucs4;
     char *test[2];
-    int i, index = 0;
+    int i;
     FILE *file;
     int errors = 0;
 
--- a/test/testintersections.c	Sat Jul 13 21:06:56 2013 +0200
+++ b/test/testintersections.c	Sat Jul 13 21:13:09 2013 +0200
@@ -98,7 +98,6 @@
 DrawLines(SDL_Renderer * renderer)
 {
     int i;
-    int x1, y1, x2, y2;
     SDL_Rect viewport;
 
     /* Query the sizes */
--- a/test/testloadso.c	Sat Jul 13 21:06:56 2013 +0200
+++ b/test/testloadso.c	Sat Jul 13 21:13:09 2013 +0200
@@ -78,5 +78,5 @@
         SDL_UnloadObject(lib);
     }
     SDL_Quit();
-    return (0);
+    return retval;
 }
--- a/test/testrumble.c	Sat Jul 13 21:06:56 2013 +0200
+++ b/test/testrumble.c	Sat Jul 13 21:13:09 2013 +0200
@@ -50,10 +50,6 @@
     int i;
     char *name;
     int index;
-    SDL_HapticEffect efx[5];
-    int id[5];
-    int nefx;
-    unsigned int supported;
 
     name = NULL;
     index = -1;
@@ -130,7 +126,7 @@
     SDL_HapticRumbleStop(haptic);
     SDL_Delay(2000);
     printf("Playing 2 second rumble at 0.3 magnitude.\n");
-    if (SDL_HapticRumblePlay(haptic, 0.3, 5000) != 0) {
+    if (SDL_HapticRumblePlay(haptic, 0.3f, 5000) != 0) {
        printf("\nFailed to play rumble: %s\n", SDL_GetError() );
        return 1;
     }