From 2c5d040da909622195afd2dd052aa9554987ea78 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Mon, 5 Jun 2023 02:30:52 +0200
Subject: [PATCH] examples: fix warnings in examples
---
showanim.c | 4 +++-
showimage.c | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/showanim.c b/showanim.c
index 46c59c9e..5e476ac8 100644
--- a/showanim.c
+++ b/showanim.c
@@ -61,6 +61,8 @@ int main(int argc, char *argv[])
int current_frame, delay;
SDL_Event event;
+ (void)argc;
+
/* Check command line usage */
if ( ! argv[1] ) {
SDL_Log("Usage: %s [-fullscreen] <image_file> ...\n", argv[0]);
@@ -140,7 +142,7 @@ int main(int argc, char *argv[])
case SDLK_ESCAPE:
case SDLK_q:
argv[i+1] = NULL;
- /* Drop through to done */
+ SDL_FALLTHROUGH;
case SDLK_SPACE:
case SDLK_TAB:
done = 1;
diff --git a/showimage.c b/showimage.c
index 25982628..372dd262 100644
--- a/showimage.c
+++ b/showimage.c
@@ -61,6 +61,8 @@ int main(int argc, char *argv[])
SDL_Event event;
const char *saveFile = NULL;
+ (void)argc;
+
/* Check command line usage */
if ( ! argv[1] ) {
SDL_Log("Usage: %s [-fullscreen] [-save file.png] <image_file> ...\n", argv[0]);
@@ -155,7 +157,7 @@ int main(int argc, char *argv[])
case SDLK_ESCAPE:
case SDLK_q:
argv[i+1] = NULL;
- /* Drop through to done */
+ SDL_FALLTHROUGH;
case SDLK_SPACE:
case SDLK_TAB:
done = 1;