Fixed format string faults in audio tests.
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>
Mon, 09 Jun 2014 17:25:03 +0200
changeset 8853a25dcbe4fb02
parent 8852 bb99ec3b21d8
child 8854 312c50aa67dd
Fixed format string faults in audio tests.

They were found by the recent code annotations.
test/testautomation_audio.c
     1.1 --- a/test/testautomation_audio.c	Sun Jun 08 18:50:40 2014 -0300
     1.2 +++ b/test/testautomation_audio.c	Mon Jun 09 17:25:03 2014 +0200
     1.3 @@ -412,7 +412,7 @@
     1.4              i, _audioFormatsVerbose[i], spec1.format, j, spec1.channels, k, spec1.freq, ii, _audioFormatsVerbose[ii], spec2.format, jj, spec2.channels, kk, spec2.freq);
     1.5          SDLTest_AssertCheck(result == 0 || result == 1, "Verify result value; expected: 0 or 1, got: %i", result);
     1.6          if (result<0) {
     1.7 -          SDLTest_LogError(SDL_GetError());
     1.8 +          SDLTest_LogError("%s", SDL_GetError());
     1.9          } else {
    1.10            SDLTest_AssertCheck(cvt.len_mult > 0, "Verify that cvt.len_mult value; expected: >0, got: %i", cvt.len_mult);
    1.11          }
    1.12 @@ -502,7 +502,7 @@
    1.13          SDL_strlcat(message, " spec2.freq", 256);
    1.14          spec2.freq = 0;
    1.15      }
    1.16 -    SDLTest_Log(message);
    1.17 +    SDLTest_Log("%s", message);
    1.18      result = SDL_BuildAudioCVT(&cvt, spec1.format, spec1.channels, spec1.freq,
    1.19                                     spec2.format, spec2.channels, spec2.freq);
    1.20      SDLTest_AssertPass("Call to SDL_BuildAudioCVT(spec1 ==> spec2)");
    1.21 @@ -688,7 +688,7 @@
    1.22      if (c & 4) {
    1.23        SDL_strlcat(message, " Frequencies", 128);
    1.24      }
    1.25 -    SDLTest_Log(message);
    1.26 +    SDLTest_Log("%s", message);
    1.27      /* All source conversions with random conversion targets */
    1.28      for (i = 0; i < _numAudioFormats; i++) {
    1.29        for (j = 0; j < _numAudioChannels; j++) {
    1.30 @@ -725,7 +725,7 @@
    1.31              i, _audioFormatsVerbose[i], spec1.format, j, spec1.channels, k, spec1.freq, ii, _audioFormatsVerbose[ii], spec2.format, jj, spec2.channels, kk, spec2.freq);
    1.32            SDLTest_AssertCheck(result == 1, "Verify result value; expected: 1, got: %i", result);
    1.33            if (result != 1) {
    1.34 -            SDLTest_LogError(SDL_GetError());
    1.35 +            SDLTest_LogError("%s", SDL_GetError());
    1.36            } else {
    1.37              SDLTest_AssertCheck(cvt.len_mult > 0, "Verify that cvt.len_mult value; expected: >0, got: %i", cvt.len_mult);
    1.38              if (cvt.len_mult < 1) return TEST_ABORTED;