Remove casts from typed pointer to void * for printf %p in test projects

This commit is contained in:
Petar Popovic
2024-09-24 13:07:15 +02:00
committed by Ozkan Sezer
parent 57418475ce
commit e5d3a1b6f5
3 changed files with 8 additions and 8 deletions

View File

@@ -567,7 +567,7 @@ static int SDLCALL audio_buildAudioStream(void *arg)
spec1.freq = 22050;
stream = SDL_CreateAudioStream(&spec1, &spec1);
SDLTest_AssertPass("Call to SDL_CreateAudioStream(spec1 ==> spec1)");
SDLTest_AssertCheck(stream != NULL, "Verify stream value; expected: != NULL, got: %p", (void *)stream);
SDLTest_AssertCheck(stream != NULL, "Verify stream value; expected: != NULL, got: %p", stream);
SDL_DestroyAudioStream(stream);
/* Typical conversion */
@@ -579,7 +579,7 @@ static int SDLCALL audio_buildAudioStream(void *arg)
spec2.freq = 44100;
stream = SDL_CreateAudioStream(&spec1, &spec2);
SDLTest_AssertPass("Call to SDL_CreateAudioStream(spec1 ==> spec2)");
SDLTest_AssertCheck(stream != NULL, "Verify stream value; expected: != NULL, got: %p", (void *)stream);
SDLTest_AssertCheck(stream != NULL, "Verify stream value; expected: != NULL, got: %p", stream);
SDL_DestroyAudioStream(stream);
/* All source conversions with random conversion targets, allow 'null' conversions */
@@ -599,7 +599,7 @@ static int SDLCALL audio_buildAudioStream(void *arg)
SDLTest_AssertPass("Call to SDL_CreateAudioStream(format[%i]=%s(%i),channels[%i]=%i,freq[%i]=%i ==> format[%i]=%s(%i),channels[%i]=%i,freq[%i]=%i)",
i, g_audioFormatsVerbose[i], spec1.format, j, spec1.channels, k, spec1.freq, ii, g_audioFormatsVerbose[ii], spec2.format, jj, spec2.channels, kk, spec2.freq);
SDLTest_AssertCheck(stream != NULL, "Verify stream value; expected: != NULL, got: %p", (void *)stream);
SDLTest_AssertCheck(stream != NULL, "Verify stream value; expected: != NULL, got: %p", stream);
if (stream == NULL) {
SDLTest_LogError("%s", SDL_GetError());
}
@@ -684,7 +684,7 @@ static int SDLCALL audio_buildAudioStreamNegative(void *arg)
SDLTest_Log("%s", message);
stream = SDL_CreateAudioStream(&spec1, &spec2);
SDLTest_AssertPass("Call to SDL_CreateAudioStream(spec1 ==> spec2)");
SDLTest_AssertCheck(stream == NULL, "Verify stream value; expected: NULL, got: %p", (void *)stream);
SDLTest_AssertCheck(stream == NULL, "Verify stream value; expected: NULL, got: %p", stream);
error = SDL_GetError();
SDLTest_AssertPass("Call to SDL_GetError()");
SDLTest_AssertCheck(error != NULL && error[0] != '\0', "Validate that error message was not NULL or empty");
@@ -791,7 +791,7 @@ static int SDLCALL audio_convertAudio(void *arg)
stream = SDL_CreateAudioStream(&spec1, &spec2);
SDLTest_AssertPass("Call to SDL_CreateAudioStream(format[%i]=%s(%i),channels[%i]=%i,freq[%i]=%i ==> format[%i]=%s(%i),channels[%i]=%i,freq[%i]=%i)",
i, g_audioFormatsVerbose[i], spec1.format, j, spec1.channels, k, spec1.freq, ii, g_audioFormatsVerbose[ii], spec2.format, jj, spec2.channels, kk, spec2.freq);
SDLTest_AssertCheck(stream != NULL, "Verify stream value; expected: != NULL, got: %p", (void *)stream);
SDLTest_AssertCheck(stream != NULL, "Verify stream value; expected: != NULL, got: %p", stream);
if (stream == NULL) {
SDLTest_LogError("%s", SDL_GetError());
} else {