[warnings] fix redundant casts

This commit is contained in:
akallabeth 2024-10-29 14:38:50 +01:00
parent 8ee84ff054
commit 2b95757a7a
No known key found for this signature in database
GPG Key ID: A49454A3FC909FD5
3 changed files with 4 additions and 5 deletions

View File

@ -213,7 +213,7 @@ BOOL sdl_push_user_event(Uint32 type, ...)
event->data2 = va_arg(ap, void*);
break;
case SDL_USEREVENT_CREATE_WINDOWS:
event->data1 = reinterpret_cast<void*>(va_arg(ap, void*));
event->data1 = va_arg(ap, void*);
break;
case SDL_USEREVENT_WINDOW_FULLSCREEN:
case SDL_USEREVENT_WINDOW_RESIZEABLE:

View File

@ -259,7 +259,7 @@ BOOL sdl_push_user_event(Uint32 type, ...)
event->data2 = va_arg(ap, void*);
break;
case SDL_EVENT_USER_CREATE_WINDOWS:
event->data1 = reinterpret_cast<void*>(va_arg(ap, void*));
event->data1 = va_arg(ap, void*);
break;
case SDL_EVENT_USER_WINDOW_FULLSCREEN:
case SDL_EVENT_USER_WINDOW_RESIZEABLE:

View File

@ -48,9 +48,8 @@ int TestFormatSpecifiers(int argc, char* argv[])
UINT8 arg = 0xFE;
const char* chk = "u8:254 o8:376 x8:fe X8:FE";
(void)(void)sprintf_s(fmt, sizeof(fmt),
"u8:%" PRIu8 " o8:%" PRIo8 " x8:%" PRIx8 " X8:%" PRIX8 "", arg, arg,
arg, arg);
(void)sprintf_s(fmt, sizeof(fmt), "u8:%" PRIu8 " o8:%" PRIo8 " x8:%" PRIx8 " X8:%" PRIX8 "",
arg, arg, arg, arg);
if (strcmp(fmt, chk) != 0)
{