SDL: Fixed warning C4127: conditional expression is constant

From 9fc1135e3bb164d6f7b697405d40953b8f93cce9 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Fri, 19 Jan 2024 06:35:02 -0800
Subject: [PATCH] Fixed warning C4127: conditional expression is constant

---
 src/audio/directsound/SDL_directsound.c | 2 +-
 src/haptic/SDL_haptic.c                 | 2 +-
 src/render/SDL_render.c                 | 2 +-
 src/render/SDL_yuv_sw.c                 | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/audio/directsound/SDL_directsound.c b/src/audio/directsound/SDL_directsound.c
index 280d40f8ac20..940a787874f2 100644
--- a/src/audio/directsound/SDL_directsound.c
+++ b/src/audio/directsound/SDL_directsound.c
@@ -587,7 +587,7 @@ static int DSOUND_OpenDevice(SDL_AudioDevice *device)
                         wfmt.dwChannelMask = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT | SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT;
                         break;
                     default:
-                        SDL_assert(0 && "Unsupported channel count!");
+                        SDL_assert(!"Unsupported channel count!");
                         break;
                     }
                 } else if (SDL_AUDIO_ISFLOAT(device->spec.format)) {
diff --git a/src/haptic/SDL_haptic.c b/src/haptic/SDL_haptic.c
index 1fc666c379f3..b563b36da9e6 100644
--- a/src/haptic/SDL_haptic.c
+++ b/src/haptic/SDL_haptic.c
@@ -674,7 +674,7 @@ int SDL_PlayHapticRumble(SDL_Haptic *haptic, float strength, Uint32 length)
         efx->leftright.small_magnitude = efx->leftright.large_magnitude = magnitude;
         efx->leftright.length = length;
     } else {
-        SDL_assert(0 && "This should have been caught elsewhere");
+        SDL_assert(!"This should have been caught elsewhere");
     }
 
     if (SDL_UpdateHapticEffect(haptic, haptic->rumble_id, &haptic->rumble_effect) < 0) {
diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c
index a0396323bc0a..27ddbc132070 100644
--- a/src/render/SDL_render.c
+++ b/src/render/SDL_render.c
@@ -1035,7 +1035,7 @@ int SDL_GetRenderOutputSize(SDL_Renderer *renderer, int *w, int *h)
     } else if (renderer->window) {
         return SDL_GetWindowSizeInPixels(renderer->window, w, h);
     } else {
-        SDL_assert(0 && "This should never happen");
+        SDL_assert(!"This should never happen");
         return SDL_SetError("Renderer doesn't support querying output size");
     }
 }
diff --git a/src/render/SDL_yuv_sw.c b/src/render/SDL_yuv_sw.c
index 0257c5d65439..d59270880da8 100644
--- a/src/render/SDL_yuv_sw.c
+++ b/src/render/SDL_yuv_sw.c
@@ -94,7 +94,7 @@ SDL_SW_YUVTexture *SDL_SW_CreateYUVTexture(Uint32 format, int w, int h)
         break;
 
     default:
-        SDL_assert(0 && "We should never get here (caught above)");
+        SDL_assert(!"We should never get here (caught above)");
         break;
     }