Removed spurious casts

(cherry picked from commit f73419e122ab0c2c7920b9de0921f5d6a464115d)
This commit is contained in:
Sam Lantinga 2023-07-03 16:06:23 -07:00
parent e65ca61957
commit a6ba8a1585

View file

@ -84,7 +84,7 @@ int clipboard_testSetClipboardText(void *arg)
char *textRef = SDLTest_RandomAsciiString();
char *text = SDL_strdup(textRef);
int result;
result = SDL_SetClipboardText((const char *)text);
result = SDL_SetClipboardText(text);
SDLTest_AssertPass("Call to SDL_SetClipboardText succeeded");
SDLTest_AssertCheck(
result == 0,
@ -112,7 +112,7 @@ int clipboard_testSetPrimarySelectionText(void *arg)
char *textRef = SDLTest_RandomAsciiString();
char *text = SDL_strdup(textRef);
int result;
result = SDL_SetPrimarySelectionText((const char *)text);
result = SDL_SetPrimarySelectionText(text);
SDLTest_AssertPass("Call to SDL_SetPrimarySelectionText succeeded");
SDLTest_AssertCheck(
result == 0,
@ -149,7 +149,7 @@ int clipboard_testClipboardTextFunctions(void *arg)
boolResult = SDL_HasClipboardText();
SDLTest_AssertPass("Call to SDL_HasClipboardText succeeded");
if (boolResult == SDL_TRUE) {
intResult = SDL_SetClipboardText((const char *)NULL);
intResult = SDL_SetClipboardText(NULL);
SDLTest_AssertPass("Call to SDL_SetClipboardText(NULL) succeeded");
SDLTest_AssertCheck(
intResult == 0,
@ -176,7 +176,7 @@ int clipboard_testClipboardTextFunctions(void *arg)
charResult[0] == '\0', /* NOLINT(clang-analyzer-core.NullDereference): Checked for NULL above */
"Verify SDL_GetClipboardText returned string with length 0, got length %i",
(int)SDL_strlen(charResult));
intResult = SDL_SetClipboardText((const char *)text);
intResult = SDL_SetClipboardText(text);
SDLTest_AssertPass("Call to SDL_SetClipboardText succeeded");
SDLTest_AssertCheck(
intResult == 0,
@ -227,7 +227,7 @@ int clipboard_testPrimarySelectionTextFunctions(void *arg)
boolResult = SDL_HasPrimarySelectionText();
SDLTest_AssertPass("Call to SDL_HasPrimarySelectionText succeeded");
if (boolResult == SDL_TRUE) {
intResult = SDL_SetPrimarySelectionText((const char *)NULL);
intResult = SDL_SetPrimarySelectionText(NULL);
SDLTest_AssertPass("Call to SDL_SetPrimarySelectionText(NULL) succeeded");
SDLTest_AssertCheck(
intResult == 0,
@ -254,7 +254,7 @@ int clipboard_testPrimarySelectionTextFunctions(void *arg)
charResult[0] == '\0', /* NOLINT(clang-analyzer-core.NullDereference): Checked for NULL above */
"Verify SDL_GetPrimarySelectionText returned string with length 0, got length %i",
(int)SDL_strlen(charResult));
intResult = SDL_SetPrimarySelectionText((const char *)text);
intResult = SDL_SetPrimarySelectionText(text);
SDLTest_AssertPass("Call to SDL_SetPrimarySelectionText succeeded");
SDLTest_AssertCheck(
intResult == 0,