test: remove unused variables and typedefs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171
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)