mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-12-09 16:12:52 +00:00
N3DS: Fix -Wformat warnings in tests.
All warnings were about invalid specifiers. Since U/Sint32 is a long, using `%d` emits a -Wformat warning.
This commit is contained in:
committed by
Sam Lantinga
parent
43a2b0b1e5
commit
6784d84c9d
@@ -88,17 +88,17 @@ timer_delayAndGetTicks(void *arg)
|
||||
/* Get ticks count - should be non-zero by now */
|
||||
result = SDL_GetTicks();
|
||||
SDLTest_AssertPass("Call to SDL_GetTicks()");
|
||||
SDLTest_AssertCheck(result > 0, "Check result value, expected: >0, got: %d", result);
|
||||
SDLTest_AssertCheck(result > 0, "Check result value, expected: >0, got: %" SDL_PRIu32, result);
|
||||
|
||||
/* Delay a bit longer and measure ticks and verify difference */
|
||||
SDL_Delay(testDelay);
|
||||
SDLTest_AssertPass("Call to SDL_Delay(%d)", testDelay);
|
||||
SDLTest_AssertPass("Call to SDL_Delay(%" SDL_PRIu32 ")", testDelay);
|
||||
result2 = SDL_GetTicks();
|
||||
SDLTest_AssertPass("Call to SDL_GetTicks()");
|
||||
SDLTest_AssertCheck(result2 > 0, "Check result value, expected: >0, got: %d", result2);
|
||||
SDLTest_AssertCheck(result2 > 0, "Check result value, expected: >0, got: %" SDL_PRIu32, result2);
|
||||
difference = result2 - result;
|
||||
SDLTest_AssertCheck(difference > (testDelay - marginOfError), "Check difference, expected: >%d, got: %d", testDelay - marginOfError, difference);
|
||||
SDLTest_AssertCheck(difference < (testDelay + marginOfError), "Check difference, expected: <%d, got: %d", testDelay + marginOfError, difference);
|
||||
SDLTest_AssertCheck(difference > (testDelay - marginOfError), "Check difference, expected: >%" SDL_PRIu32 ", got: %" SDL_PRIu32, testDelay - marginOfError, difference);
|
||||
SDLTest_AssertCheck(difference < (testDelay + marginOfError), "Check difference, expected: <%" SDL_PRIu32 ", got: %" SDL_PRIu32, testDelay + marginOfError, difference);
|
||||
|
||||
return TEST_COMPLETED;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user