Commit b972258d56fad2f14d7f6a6146e635c8e46a93f6

Christian Rauch 2021-03-26T22:49:28

test: remove unused variables and typedefs

diff --git a/test/testautomation_clipboard.c b/test/testautomation_clipboard.c
index 7f34e2c..901f82d 100644
--- a/test/testautomation_clipboard.c
+++ b/test/testautomation_clipboard.c
@@ -21,8 +21,7 @@
 int
 clipboard_testHasClipboardText(void *arg)
 {
-    SDL_bool result;
-    result = SDL_HasClipboardText();
+    SDL_HasClipboardText();
     SDLTest_AssertPass("Call to SDL_HasClipboardText succeeded");
 
     return TEST_COMPLETED;
diff --git a/test/testautomation_keyboard.c b/test/testautomation_keyboard.c
index 32ce1ac..4ead32b 100644
--- a/test/testautomation_keyboard.c
+++ b/test/testautomation_keyboard.c
@@ -47,10 +47,8 @@ keyboard_getKeyboardState(void *arg)
 int
 keyboard_getKeyboardFocus(void *arg)
 {
-   SDL_Window* window;
-
    /* Call, but ignore return value */
-   window = SDL_GetKeyboardFocus();
+   SDL_GetKeyboardFocus();
    SDLTest_AssertPass("Call to SDL_GetKeyboardFocus()");
 
    return TEST_COMPLETED;
diff --git a/test/testautomation_platform.c b/test/testautomation_platform.c
index 8c3bf00..17ea7e0 100644
--- a/test/testautomation_platform.c
+++ b/test/testautomation_platform.c
@@ -160,38 +160,36 @@ int platform_testGetFunctions (void *arg)
  */
 int platform_testHasFunctions (void *arg)
 {
-   int ret;
-
    /* TODO: independently determine and compare values as well */
 
-   ret = SDL_HasRDTSC();
+   SDL_HasRDTSC();
    SDLTest_AssertPass("SDL_HasRDTSC()");
 
-   ret = SDL_HasAltiVec();
+   SDL_HasAltiVec();
    SDLTest_AssertPass("SDL_HasAltiVec()");
 
-   ret = SDL_HasMMX();
+   SDL_HasMMX();
    SDLTest_AssertPass("SDL_HasMMX()");
 
-   ret = SDL_Has3DNow();
+   SDL_Has3DNow();
    SDLTest_AssertPass("SDL_Has3DNow()");
 
-   ret = SDL_HasSSE();
+   SDL_HasSSE();
    SDLTest_AssertPass("SDL_HasSSE()");
 
-   ret = SDL_HasSSE2();
+   SDL_HasSSE2();
    SDLTest_AssertPass("SDL_HasSSE2()");
 
-   ret = SDL_HasSSE3();
+   SDL_HasSSE3();
    SDLTest_AssertPass("SDL_HasSSE3()");
 
-   ret = SDL_HasSSE41();
+   SDL_HasSSE41();
    SDLTest_AssertPass("SDL_HasSSE41()");
 
-   ret = SDL_HasSSE42();
+   SDL_HasSSE42();
    SDLTest_AssertPass("SDL_HasSSE42()");
 
-   ret = SDL_HasAVX();
+   SDL_HasAVX();
    SDLTest_AssertPass("SDL_HasAVX()");
 
    return TEST_COMPLETED;
diff --git a/test/testautomation_sdltest.c b/test/testautomation_sdltest.c
index 339b7c1..1790194 100644
--- a/test/testautomation_sdltest.c
+++ b/test/testautomation_sdltest.c
@@ -89,7 +89,6 @@ int
 sdltest_randomNumber(void *arg)
 {
   Sint64 result;
-  Uint64 uresult;
   double dresult;
   Uint64 umax;
   Sint64 min, max;
@@ -127,7 +126,7 @@ sdltest_randomNumber(void *arg)
   SDLTest_AssertPass("Call to SDLTest_RandomSint32");
   SDLTest_AssertCheck(result >= min && result <= max, "Verify result value, expected: [%"SDL_PRIs64",%"SDL_PRIs64"], got: %"SDL_PRIs64, min, max, result);
 
-  uresult = SDLTest_RandomUint64();
+  SDLTest_RandomUint64();
   SDLTest_AssertPass("Call to SDLTest_RandomUint64");
 
   result = SDLTest_RandomSint64();
diff --git a/test/testautomation_video.c b/test/testautomation_video.c
index 3769f31..706579a 100644
--- a/test/testautomation_video.c
+++ b/test/testautomation_video.c
@@ -477,7 +477,6 @@ video_getClosestDisplayModeRandomResolution(void *arg)
 {
   SDL_DisplayMode target;
   SDL_DisplayMode closest;
-  SDL_DisplayMode* dResult;
   int displayNum;
   int i;
   int variation;
@@ -500,7 +499,7 @@ video_getClosestDisplayModeRandomResolution(void *arg)
       target.driverdata = 0;
 
       /* Make call; may or may not find anything, so don't validate any further */
-      dResult = SDL_GetClosestDisplayMode(i, &target, &closest);
+      SDL_GetClosestDisplayMode(i, &target, &closest);
       SDLTest_AssertPass("Call to SDL_GetClosestDisplayMode(target=random/variation%d)", variation);
     }
   }
@@ -830,7 +829,7 @@ video_getSetWindowGrab(void *arg)
 {
   const char* title = "video_getSetWindowGrab Test Window";
   SDL_Window* window;
-  SDL_bool originalMouseState, originalKeyboardState, dummyState;
+  SDL_bool originalMouseState, originalKeyboardState;
 
   /* Call against new test window */
   window = _createVideoSuiteTestWindow(title);
@@ -927,11 +926,11 @@ video_getSetWindowGrab(void *arg)
                       "SDL_GetWindowKeyboardGrab() should return SDL_FALSE");
 
   /* Negative tests */
-  dummyState = SDL_GetWindowGrab(NULL);
+  SDL_GetWindowGrab(NULL);
   SDLTest_AssertPass("Call to SDL_GetWindowGrab(window=NULL)");
   _checkInvalidWindowError();
 
-  dummyState = SDL_GetWindowKeyboardGrab(NULL);
+  SDL_GetWindowKeyboardGrab(NULL);
   SDLTest_AssertPass("Call to SDL_GetWindowKeyboardGrab(window=NULL)");
   _checkInvalidWindowError();
 
diff --git a/test/testvulkan.c b/test/testvulkan.c
index 902741d..620dd84 100644
--- a/test/testvulkan.c
+++ b/test/testvulkan.c
@@ -1117,7 +1117,6 @@ static SDL_bool render(void)
 
 int main(int argc, char *argv[])
 {
-    int fsaa, accel;
     int done;
     SDL_DisplayMode mode;
     SDL_Event event;
@@ -1127,10 +1126,6 @@ int main(int argc, char *argv[])
     /* Enable standard application logging */
     SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
 
-    /* Initialize parameters */
-    fsaa = 0;
-    accel = -1;
-
     /* Initialize test framework */
     state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO);
     if(!state)