Fix warnings, only major one being an SDL_SetError not providing enough arguments.
authorBrandon Schaefer <brandon.schaefer@canonical.com>
Thu, 05 Jun 2014 15:29:23 -0700
changeset 8831 9326ec96c132
parent 8830 2d74f0c59cc7
child 8832 408b0d563b27
Fix warnings, only major one being an SDL_SetError not providing enough arguments.
src/audio/SDL_wave.c
src/filesystem/unix/SDL_sysfilesystem.c
src/test/SDL_test_harness.c
src/thread/pthread/SDL_syssem.c
--- a/src/audio/SDL_wave.c	Thu Jun 05 09:49:45 2014 -0700
+++ b/src/audio/SDL_wave.c	Thu Jun 05 15:29:23 2014 -0700
@@ -343,7 +343,7 @@
     /* 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);
     }
--- a/src/filesystem/unix/SDL_sysfilesystem.c	Thu Jun 05 09:49:45 2014 -0700
+++ b/src/filesystem/unix/SDL_sysfilesystem.c	Thu Jun 05 15:29:23 2014 -0700
@@ -197,7 +197,7 @@
     }
     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;
     }
--- a/src/test/SDL_test_harness.c	Thu Jun 05 09:49:45 2014 -0700
+++ b/src/test/SDL_test_harness.c	Thu Jun 05 15:29:23 2014 -0700
@@ -564,7 +564,7 @@
                             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) {
--- a/src/thread/pthread/SDL_syssem.c	Thu Jun 05 09:49:45 2014 -0700
+++ b/src/thread/pthread/SDL_syssem.c	Thu Jun 05 15:29:23 2014 -0700
@@ -150,7 +150,7 @@
         if (errno == ETIMEDOUT) {
             retval = SDL_MUTEX_TIMEDOUT;
         } else {
-            SDL_SetError(strerror(errno));
+            SDL_SetError("sem_timedwait returned an error: %s", strerror(errno));
         }
     }
 #else