From 1f716769062093a30caea607cf1876de6e3527d3 Mon Sep 17 00:00:00 2001 From: Brandon Schaefer Date: Thu, 5 Jun 2014 15:29:23 -0700 Subject: [PATCH] Fix warnings, only major one being an SDL_SetError not providing enough arguments. --- src/audio/SDL_wave.c | 2 +- src/filesystem/unix/SDL_sysfilesystem.c | 2 +- src/test/SDL_test_harness.c | 2 +- src/thread/pthread/SDL_syssem.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/audio/SDL_wave.c b/src/audio/SDL_wave.c index 8daa8c6672fc7..5487f2d72cb61 100644 --- a/src/audio/SDL_wave.c +++ b/src/audio/SDL_wave.c @@ -343,7 +343,7 @@ IMA_ADPCM_decode(Uint8 ** audio_buf, Uint32 * audio_len) /* Check to make sure we have enough variables in the state array */ channels = IMA_ADPCM_state.wavefmt.channels; if (channels > SDL_arraysize(IMA_ADPCM_state.state)) { - SDL_SetError("IMA ADPCM decoder can only handle %d channels", + SDL_SetError("IMA ADPCM decoder can only handle %zu channels", SDL_arraysize(IMA_ADPCM_state.state)); return (-1); } diff --git a/src/filesystem/unix/SDL_sysfilesystem.c b/src/filesystem/unix/SDL_sysfilesystem.c index 0349476eb86ef..cd11a67d3e63c 100644 --- a/src/filesystem/unix/SDL_sysfilesystem.c +++ b/src/filesystem/unix/SDL_sysfilesystem.c @@ -197,7 +197,7 @@ SDL_GetPrefPath(const char *org, const char *app) } if (mkdir(retval, 0700) != 0 && errno != EEXIST) { error: - SDL_SetError("Couldn't create directory '%s': ", retval, strerror(errno)); + SDL_SetError("Couldn't create directory '%s': '%s'", retval, strerror(errno)); SDL_free(retval); return NULL; } diff --git a/src/test/SDL_test_harness.c b/src/test/SDL_test_harness.c index 93f8dd7036251..74e898efc2d67 100644 --- a/src/test/SDL_test_harness.c +++ b/src/test/SDL_test_harness.c @@ -564,7 +564,7 @@ int SDLTest_RunSuites(SDLTest_TestSuiteReference *testSuites[], const char *user execKey = SDLTest_GenerateExecKey((char *)runSeed, testSuite->name, testCase->name, iterationCounter); } - SDLTest_Log("Test Iteration %i: execKey %llu", iterationCounter, execKey); + SDLTest_Log("Test Iteration %i: execKey %" PRIu64 "", iterationCounter, execKey); testResult = SDLTest_RunTest(testSuite, testCase, execKey); if (testResult == TEST_RESULT_PASSED) { diff --git a/src/thread/pthread/SDL_syssem.c b/src/thread/pthread/SDL_syssem.c index 358baff28a07e..6d84e1b8922ac 100644 --- a/src/thread/pthread/SDL_syssem.c +++ b/src/thread/pthread/SDL_syssem.c @@ -150,7 +150,7 @@ SDL_SemWaitTimeout(SDL_sem * sem, Uint32 timeout) if (errno == ETIMEDOUT) { retval = SDL_MUTEX_TIMEDOUT; } else { - SDL_SetError(strerror(errno)); + SDL_SetError("sem_timedwait returned an error: %s", strerror(errno)); } } #else