mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-04 08:56:25 +00:00
Fix some format specifier warnings
The warnings were produced by GCC 9.2.x for x86_64-linux-gnu or i386-pc-msdosdjgpp targets. Most of the fixes involve changing the type of a variable rather than the format specifier. For many of the affected test conuter variables, a basic int seems sufficient. Some format specifier warnings still remain for cases where changing type or casting seemed inappropriate. Those warnings will probably require some new format specifier macros (e.g. SDL_PRIu32).
This commit is contained in:
@@ -36,10 +36,10 @@
|
||||
#define SDLTEST_ASSERT_SUMMARY_FORMAT "Assert Summary: Total=%d Passed=%d Failed=%d"
|
||||
|
||||
/* ! \brief counts the failed asserts */
|
||||
static Uint32 SDLTest_AssertsFailed = 0;
|
||||
static int SDLTest_AssertsFailed = 0;
|
||||
|
||||
/* ! \brief counts the passed asserts */
|
||||
static Uint32 SDLTest_AssertsPassed = 0;
|
||||
static int SDLTest_AssertsPassed = 0;
|
||||
|
||||
/*
|
||||
* Assert that logs and break execution flow on failures (i.e. for harness errors).
|
||||
@@ -122,7 +122,7 @@ void SDLTest_ResetAssertSummary()
|
||||
*/
|
||||
void SDLTest_LogAssertSummary()
|
||||
{
|
||||
Uint32 totalAsserts = SDLTest_AssertsPassed + SDLTest_AssertsFailed;
|
||||
int totalAsserts = SDLTest_AssertsPassed + SDLTest_AssertsFailed;
|
||||
if (SDLTest_AssertsFailed == 0)
|
||||
{
|
||||
SDLTest_Log(SDLTEST_ASSERT_SUMMARY_FORMAT, totalAsserts, SDLTest_AssertsPassed, SDLTest_AssertsFailed);
|
||||
|
Reference in New Issue
Block a user