From 157977b2df94b807f49096436f481c15b96eb478 Mon Sep 17 00:00:00 2001
From: James Gangur <[EMAIL REDACTED]>
Date: Fri, 13 Jun 2025 14:10:44 +1000
Subject: [PATCH] fix unused paramater warnings
---
src/IMG_avif.c | 4 ----
src/IMG_bmp.c | 10 ++++++----
src/IMG_gif.c | 6 +++---
src/IMG_jpg.c | 3 ---
src/IMG_jxl.c | 3 ---
src/IMG_lbm.c | 5 ++---
src/IMG_pcx.c | 5 ++---
src/IMG_png.c | 5 ++---
src/IMG_pnm.c | 5 ++---
src/IMG_qoi.c | 5 ++---
src/IMG_svg.c | 7 ++++---
src/IMG_tga.c | 6 ++----
src/IMG_tif.c | 5 -----
src/IMG_webp.c | 6 ------
src/IMG_xcf.c | 5 ++---
src/IMG_xpm.c | 8 ++++----
src/IMG_xv.c | 5 ++---
src/IMG_xxx.c | 8 ++------
18 files changed, 35 insertions(+), 66 deletions(-)
diff --git a/src/IMG_avif.c b/src/IMG_avif.c
index 27e506d05..ffbe6519a 100644
--- a/src/IMG_avif.c
+++ b/src/IMG_avif.c
@@ -707,10 +707,6 @@ static bool IMG_SaveAVIF_IO_libavif(SDL_Surface *surface, SDL_IOStream *dst, int
/* We don't have any way to save AVIF files */
#undef SDL_IMAGE_SAVE_AVIF
-#if defined(_MSC_VER) && _MSC_VER >= 1300
-#pragma warning(disable : 4100) /* warning C4100: 'op' : unreferenced formal parameter */
-#endif
-
/* See if an image is contained in a data source */
bool IMG_isAVIF(SDL_IOStream *src)
{
diff --git a/src/IMG_bmp.c b/src/IMG_bmp.c
index 499463961..fa6adf2ca 100644
--- a/src/IMG_bmp.c
+++ b/src/IMG_bmp.c
@@ -473,41 +473,43 @@ SDL_Surface *IMG_LoadCUR_IO(SDL_IOStream *src)
#else
-#if defined(_MSC_VER) && _MSC_VER >= 1300
-#pragma warning(disable : 4100) /* warning C4100: 'op' : unreferenced formal parameter */
-#endif
-
/* See if an image is contained in a data source */
bool IMG_isBMP(SDL_IOStream *src)
{
+ (void)src;
return false;
}
bool IMG_isICO(SDL_IOStream *src)
{
+ (void)src;
return false;
}
bool IMG_isCUR(SDL_IOStream *src)
{
+ (void)src;
return false;
}
/* Load a BMP type image from an SDL datasource */
SDL_Surface *IMG_LoadBMP_IO(SDL_IOStream *src)
{
+ (void)src;
return NULL;
}
/* Load a BMP type image from an SDL datasource */
SDL_Surface *IMG_LoadCUR_IO(SDL_IOStream *src)
{
+ (void)src;
return NULL;
}
/* Load a BMP type image from an SDL datasource */
SDL_Surface *IMG_LoadICO_IO(SDL_IOStream *src)
{
+ (void)src;
return NULL;
}
diff --git a/src/IMG_gif.c b/src/IMG_gif.c
index 7775ca502..9c3c373fb 100644
--- a/src/IMG_gif.c
+++ b/src/IMG_gif.c
@@ -742,6 +742,7 @@ IMG_Animation *IMG_LoadGIFAnimation_IO(SDL_IOStream *src)
/* Load a GIF type animation from an SDL datasource */
IMG_Animation *IMG_LoadGIFAnimation_IO(SDL_IOStream *src)
{
+ (void)src;
return NULL;
}
@@ -789,19 +790,18 @@ SDL_Surface *IMG_LoadGIF_IO(SDL_IOStream *src)
}
#else
-#if defined(_MSC_VER) && _MSC_VER >= 1300
-#pragma warning(disable : 4100) /* warning C4100: 'op' : unreferenced formal parameter */
-#endif
/* See if an image is contained in a data source */
bool IMG_isGIF(SDL_IOStream *src)
{
+ (void)src;
return false;
}
/* Load a GIF type image from an SDL datasource */
SDL_Surface *IMG_LoadGIF_IO(SDL_IOStream *src)
{
+ (void)src;
return NULL;
}
diff --git a/src/IMG_jpg.c b/src/IMG_jpg.c
index 3f650a44d..c570ca0d0 100644
--- a/src/IMG_jpg.c
+++ b/src/IMG_jpg.c
@@ -663,9 +663,6 @@ SDL_Surface *IMG_LoadJPG_IO(SDL_IOStream *src)
#endif /* WANT_JPEGLIB */
#else
-#if defined(_MSC_VER) && _MSC_VER >= 1300
-#pragma warning(disable : 4100) /* warning C4100: 'op' : unreferenced formal parameter */
-#endif
/* See if an image is contained in a data source */
bool IMG_isJPG(SDL_IOStream *src)
diff --git a/src/IMG_jxl.c b/src/IMG_jxl.c
index 85f637ee3..2d1eec680 100644
--- a/src/IMG_jxl.c
+++ b/src/IMG_jxl.c
@@ -251,9 +251,6 @@ SDL_Surface *IMG_LoadJXL_IO(SDL_IOStream *src)
}
#else
-#if defined(_MSC_VER) && _MSC_VER >= 1300
-#pragma warning(disable : 4100) /* warning C4100: 'op' : unreferenced formal parameter */
-#endif
/* See if an image is contained in a data source */
bool IMG_isJXL(SDL_IOStream *src)
diff --git a/src/IMG_lbm.c b/src/IMG_lbm.c
index 577ca193c..940bf8318 100644
--- a/src/IMG_lbm.c
+++ b/src/IMG_lbm.c
@@ -503,19 +503,18 @@ SDL_Surface *IMG_LoadLBM_IO(SDL_IOStream *src )
}
#else /* LOAD_LBM */
-#if defined(_MSC_VER) && _MSC_VER >= 1300
-#pragma warning(disable : 4100) /* warning C4100: 'op' : unreferenced formal parameter */
-#endif
/* See if an image is contained in a data source */
bool IMG_isLBM(SDL_IOStream *src)
{
+ (void)src;
return false;
}
/* Load an IFF type image from an SDL datasource */
SDL_Surface *IMG_LoadLBM_IO(SDL_IOStream *src)
{
+ (void)src;
return NULL;
}
diff --git a/src/IMG_pcx.c b/src/IMG_pcx.c
index 232c33eb2..4de9f71f8 100644
--- a/src/IMG_pcx.c
+++ b/src/IMG_pcx.c
@@ -293,19 +293,18 @@ SDL_Surface *IMG_LoadPCX_IO(SDL_IOStream *src)
}
#else
-#if defined(_MSC_VER) && _MSC_VER >= 1300
-#pragma warning(disable : 4100) /* warning C4100: 'op' : unreferenced formal parameter */
-#endif
/* See if an image is contained in a data source */
bool IMG_isPCX(SDL_IOStream *src)
{
+ (void)src;
return false;
}
/* Load a PCX type image from an SDL datasource */
SDL_Surface *IMG_LoadPCX_IO(SDL_IOStream *src)
{
+ (void)src;
return NULL;
}
diff --git a/src/IMG_png.c b/src/IMG_png.c
index ac6b58100..be371d121 100644
--- a/src/IMG_png.c
+++ b/src/IMG_png.c
@@ -543,19 +543,18 @@ SDL_Surface *IMG_LoadPNG_IO(SDL_IOStream *src)
#endif /* WANT_LIBPNG */
#else
-#if defined(_MSC_VER) && _MSC_VER >= 1300
-#pragma warning(disable : 4100) /* warning C4100: 'op' : unreferenced formal parameter */
-#endif
/* See if an image is contained in a data source */
bool IMG_isPNG(SDL_IOStream *src)
{
+ (void)src;
return false;
}
/* Load a PNG type image from an SDL datasource */
SDL_Surface *IMG_LoadPNG_IO(SDL_IOStream *src)
{
+ (void)src;
return NULL;
}
diff --git a/src/IMG_pnm.c b/src/IMG_pnm.c
index 05cd85a59..c29ce9bf7 100644
--- a/src/IMG_pnm.c
+++ b/src/IMG_pnm.c
@@ -253,19 +253,18 @@ SDL_Surface *IMG_LoadPNM_IO(SDL_IOStream *src)
}
#else
-#if defined(_MSC_VER) && _MSC_VER >= 1300
-#pragma warning(disable : 4100) /* warning C4100: 'op' : unreferenced formal parameter */
-#endif
/* See if an image is contained in a data source */
bool IMG_isPNM(SDL_IOStream *src)
{
+ (void)src;
return false;
}
/* Load a PNM type image from an SDL datasource */
SDL_Surface *IMG_LoadPNM_IO(SDL_IOStream *src)
{
+ (void)src;
return NULL;
}
diff --git a/src/IMG_qoi.c b/src/IMG_qoi.c
index f0c67fd04..6bbde1649 100644
--- a/src/IMG_qoi.c
+++ b/src/IMG_qoi.c
@@ -108,19 +108,18 @@ SDL_Surface *IMG_LoadQOI_IO(SDL_IOStream *src)
}
#else
-#if defined(_MSC_VER) && _MSC_VER >= 1300
-#pragma warning(disable : 4100) /* warning C4100: 'op' : unreferenced formal parameter */
-#endif
/* See if an image is contained in a data source */
bool IMG_isQOI(SDL_IOStream *src)
{
+ (void)src;
return false;
}
/* Load a QOI type image from an SDL datasource */
SDL_Surface *IMG_LoadQOI_IO(SDL_IOStream *src)
{
+ (void)src;
return NULL;
}
diff --git a/src/IMG_svg.c b/src/IMG_svg.c
index 04244d646..38d62ae80 100644
--- a/src/IMG_svg.c
+++ b/src/IMG_svg.c
@@ -160,19 +160,20 @@ SDL_Surface *IMG_LoadSizedSVG_IO(SDL_IOStream *src, int width, int height)
}
#else
-#if defined(_MSC_VER) && _MSC_VER >= 1300
-#pragma warning(disable : 4100) /* warning C4100: 'op' : unreferenced formal parameter */
-#endif
/* See if an image is contained in a data source */
bool IMG_isSVG(SDL_IOStream *src)
{
+ (void)src;
return false;
}
/* Load a SVG type image from an SDL datasource */
SDL_Surface *IMG_LoadSizedSVG_IO(SDL_IOStream *src, int width, int height)
{
+ (void)src;
+ (void)width;
+ (void)height;
return NULL;
}
diff --git a/src/IMG_tga.c b/src/IMG_tga.c
index 42c7dcfd0..0358bd257 100644
--- a/src/IMG_tga.c
+++ b/src/IMG_tga.c
@@ -336,14 +336,12 @@ SDL_Surface *IMG_LoadTGA_IO(SDL_IOStream *src)
}
#else
-#if defined(_MSC_VER) && _MSC_VER >= 1300
-#pragma warning(disable : 4100) /* warning C4100: 'op' : unreferenced formal parameter */
-#endif
/* dummy TGA load routine */
SDL_Surface *IMG_LoadTGA_IO(SDL_IOStream *src)
{
- return(NULL);
+ (void)src;
+ return NULL;
}
#endif /* LOAD_TGA */
diff --git a/src/IMG_tif.c b/src/IMG_tif.c
index c4bb15d03..10d22f462 100644
--- a/src/IMG_tif.c
+++ b/src/IMG_tif.c
@@ -218,15 +218,11 @@ SDL_Surface* IMG_LoadTIF_IO(SDL_IOStream * src)
}
#else
-#if defined(_MSC_VER) && _MSC_VER >= 1300
-#pragma warning(disable : 4100) /* warning C4100: 'op' : unreferenced formal parameter */
-#endif
/* See if an image is contained in a data source */
bool IMG_isTIF(SDL_IOStream *src)
{
(void)src;
-
return false;
}
@@ -234,7 +230,6 @@ bool IMG_isTIF(SDL_IOStream *src)
SDL_Surface *IMG_LoadTIF_IO(SDL_IOStream *src)
{
(void)src;
-
return NULL;
}
diff --git a/src/IMG_webp.c b/src/IMG_webp.c
index 71b1d0e40..17c3cd3b4 100644
--- a/src/IMG_webp.c
+++ b/src/IMG_webp.c
@@ -429,15 +429,11 @@ IMG_Animation *IMG_LoadWEBPAnimation_IO(SDL_IOStream *src)
}
#else
-#if defined(_MSC_VER) && _MSC_VER >= 1300
-#pragma warning(disable : 4100) /* warning C4100: 'op' : unreferenced formal parameter */
-#endif
/* See if an image is contained in a data source */
bool IMG_isWEBP(SDL_IOStream *src)
{
(void)src;
-
return false;
}
@@ -445,14 +441,12 @@ bool IMG_isWEBP(SDL_IOStream *src)
SDL_Surface *IMG_LoadWEBP_IO(SDL_IOStream *src)
{
(void)src;
-
return NULL;
}
IMG_Animation *IMG_LoadWEBPAnimation_IO(SDL_IOStream *src)
{
(void)src;
-
return NULL;
}
diff --git a/src/IMG_xcf.c b/src/IMG_xcf.c
index dd991cfe8..d06c12659 100644
--- a/src/IMG_xcf.c
+++ b/src/IMG_xcf.c
@@ -1029,19 +1029,18 @@ SDL_Surface *IMG_LoadXCF_IO(SDL_IOStream *src)
}
#else
-#if defined(_MSC_VER) && _MSC_VER >= 1300
-#pragma warning(disable : 4100) /* warning C4100: 'op' : unreferenced formal parameter */
-#endif
/* See if an image is contained in a data source */
bool IMG_isXCF(SDL_IOStream *src)
{
+ (void)src;
return false;
}
/* Load a XCF type image from an SDL datasource */
SDL_Surface *IMG_LoadXCF_IO(SDL_IOStream *src)
{
+ (void)src;
return NULL;
}
diff --git a/src/IMG_xpm.c b/src/IMG_xpm.c
index fe98ce0f3..5439c2307 100644
--- a/src/IMG_xpm.c
+++ b/src/IMG_xpm.c
@@ -1208,30 +1208,30 @@ SDL_Surface *IMG_ReadXPMFromArrayToRGB888(char **xpm)
}
#else /* not LOAD_XPM */
-#if defined(_MSC_VER) && _MSC_VER >= 1300
-#pragma warning(disable : 4100) /* warning C4100: 'op' : unreferenced formal parameter */
-#endif
/* See if an image is contained in a data source */
bool IMG_isXPM(SDL_IOStream *src)
{
+ (void)src;
return false;
}
-
/* Load a XPM type image from an SDL datasource */
SDL_Surface *IMG_LoadXPM_IO(SDL_IOStream *src)
{
+ (void)src;
return NULL;
}
SDL_Surface *IMG_ReadXPMFromArray(char **xpm)
{
+ (void)xpm;
return NULL;
}
SDL_Surface *IMG_ReadXPMFromArrayToRGB888(char **xpm)
{
+ (void)xpm;
return NULL;
}
diff --git a/src/IMG_xv.c b/src/IMG_xv.c
index 5a893c5c6..a5ae7bb43 100644
--- a/src/IMG_xv.c
+++ b/src/IMG_xv.c
@@ -148,19 +148,18 @@ SDL_Surface *IMG_LoadXV_IO(SDL_IOStream *src)
}
#else
-#if defined(_MSC_VER) && _MSC_VER >= 1300
-#pragma warning(disable : 4100) /* warning C4100: 'op' : unreferenced formal parameter */
-#endif
/* See if an image is contained in a data source */
bool IMG_isXV(SDL_IOStream *src)
{
+ (void)src;
return false;
}
/* Load a XXX type image from an SDL datasource */
SDL_Surface *IMG_LoadXV_IO(SDL_IOStream *src)
{
+ (void)src;
return NULL;
}
diff --git a/src/IMG_xxx.c b/src/IMG_xxx.c
index d8401d776..05c693683 100644
--- a/src/IMG_xxx.c
+++ b/src/IMG_xxx.c
@@ -76,19 +76,15 @@ SDL_Surface *IMG_LoadXXX_IO(SDL_IOStream *src)
#else
-#if defined(_MSC_VER) && _MSC_VER >= 1300
-#pragma warning(disable : 4100) /* warning C4100: 'op' : unreferenced formal parameter */
-#endif
-
bool IMG_isXXX(SDL_IOStream *src)
{
- (void) src;
+ (void)src;
return false;
}
SDL_Surface *IMG_LoadXXX_IO(SDL_IOStream *src)
{
- (void) src;
+ (void)src;
return NULL;
}