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 88319326ec96c132
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
     1.1 --- a/src/audio/SDL_wave.c	Thu Jun 05 09:49:45 2014 -0700
     1.2 +++ b/src/audio/SDL_wave.c	Thu Jun 05 15:29:23 2014 -0700
     1.3 @@ -343,7 +343,7 @@
     1.4      /* Check to make sure we have enough variables in the state array */
     1.5      channels = IMA_ADPCM_state.wavefmt.channels;
     1.6      if (channels > SDL_arraysize(IMA_ADPCM_state.state)) {
     1.7 -        SDL_SetError("IMA ADPCM decoder can only handle %d channels",
     1.8 +        SDL_SetError("IMA ADPCM decoder can only handle %zu channels",
     1.9                       SDL_arraysize(IMA_ADPCM_state.state));
    1.10          return (-1);
    1.11      }
     2.1 --- a/src/filesystem/unix/SDL_sysfilesystem.c	Thu Jun 05 09:49:45 2014 -0700
     2.2 +++ b/src/filesystem/unix/SDL_sysfilesystem.c	Thu Jun 05 15:29:23 2014 -0700
     2.3 @@ -197,7 +197,7 @@
     2.4      }
     2.5      if (mkdir(retval, 0700) != 0 && errno != EEXIST) {
     2.6  error:
     2.7 -        SDL_SetError("Couldn't create directory '%s': ", retval, strerror(errno));
     2.8 +        SDL_SetError("Couldn't create directory '%s': '%s'", retval, strerror(errno));
     2.9          SDL_free(retval);
    2.10          return NULL;
    2.11      }
     3.1 --- a/src/test/SDL_test_harness.c	Thu Jun 05 09:49:45 2014 -0700
     3.2 +++ b/src/test/SDL_test_harness.c	Thu Jun 05 15:29:23 2014 -0700
     3.3 @@ -564,7 +564,7 @@
     3.4                              execKey = SDLTest_GenerateExecKey((char *)runSeed, testSuite->name, testCase->name, iterationCounter);
     3.5                          }
     3.6  
     3.7 -                        SDLTest_Log("Test Iteration %i: execKey %llu", iterationCounter, execKey);
     3.8 +                        SDLTest_Log("Test Iteration %i: execKey %" PRIu64 "", iterationCounter, execKey);
     3.9                          testResult = SDLTest_RunTest(testSuite, testCase, execKey);
    3.10  
    3.11                          if (testResult == TEST_RESULT_PASSED) {
     4.1 --- a/src/thread/pthread/SDL_syssem.c	Thu Jun 05 09:49:45 2014 -0700
     4.2 +++ b/src/thread/pthread/SDL_syssem.c	Thu Jun 05 15:29:23 2014 -0700
     4.3 @@ -150,7 +150,7 @@
     4.4          if (errno == ETIMEDOUT) {
     4.5              retval = SDL_MUTEX_TIMEDOUT;
     4.6          } else {
     4.7 -            SDL_SetError(strerror(errno));
     4.8 +            SDL_SetError("sem_timedwait returned an error: %s", strerror(errno));
     4.9          }
    4.10      }
    4.11  #else