From 24a0403bd04a2078c9953d59922cb69471292c47 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Sun, 23 Nov 2025 22:29:15 +0100
Subject: [PATCH] Build with -Wno-unused-parameter
---
cmake/PrivateSdlFunctions.cmake | 2 +-
src/IMG_ImageIO.m | 1 -
src/IMG_ani.c | 5 -----
src/IMG_anim_encoder.c | 1 -
src/IMG_avif.c | 15 ---------------
src/IMG_bmp.c | 21 ---------------------
src/IMG_gif.c | 13 -------------
src/IMG_jpg.c | 15 ---------------
src/IMG_jxl.c | 2 --
src/IMG_lbm.c | 2 --
src/IMG_libpng.c | 9 ---------
src/IMG_pcx.c | 2 --
src/IMG_png.c | 7 -------
src/IMG_pnm.c | 2 --
src/IMG_qoi.c | 2 --
src/IMG_svg.c | 4 ----
src/IMG_tga.c | 6 ------
src/IMG_tif.c | 9 ---------
src/IMG_webp.c | 13 -------------
src/IMG_xcf.c | 5 -----
src/IMG_xpm.c | 4 ----
src/IMG_xv.c | 2 --
src/IMG_xxx.c | 2 --
23 files changed, 1 insertion(+), 143 deletions(-)
diff --git a/cmake/PrivateSdlFunctions.cmake b/cmake/PrivateSdlFunctions.cmake
index 0312faa19..8d71ede07 100644
--- a/cmake/PrivateSdlFunctions.cmake
+++ b/cmake/PrivateSdlFunctions.cmake
@@ -310,7 +310,7 @@ function(sdl_add_warning_options TARGET)
if(MSVC)
target_compile_options(${TARGET} PRIVATE /W2)
else()
- target_compile_options(${TARGET} PRIVATE -Wall -Wextra)
+ target_compile_options(${TARGET} PRIVATE -Wall -Wextra -Wno-unused-parameter)
endif()
if(ARGS_WARNING_AS_ERROR)
if(MSVC)
diff --git a/src/IMG_ImageIO.m b/src/IMG_ImageIO.m
index 96cdd9d51..65bc59836 100644
--- a/src/IMG_ImageIO.m
+++ b/src/IMG_ImageIO.m
@@ -44,7 +44,6 @@ static size_t MyProviderGetBytesCallback(void* userdata, void* quartz_buffer, si
// so you can clean up any resources.
static void MyProviderReleaseInfoCallback(void* userdata)
{
- (void)userdata;
// What should I put here?
// I think the user and SDL_IOStream controls closing, so I don't do anything.
}
diff --git a/src/IMG_ani.c b/src/IMG_ani.c
index ed2ffb3c6..8f7f9b42b 100644
--- a/src/IMG_ani.c
+++ b/src/IMG_ani.c
@@ -470,14 +470,11 @@ bool IMG_CreateANIAnimationDecoder(IMG_AnimationDecoder *decoder, SDL_Properties
bool IMG_isANI(SDL_IOStream *src)
{
- (void)src;
return false;
}
bool IMG_CreateANIAnimationDecoder(IMG_AnimationDecoder *decoder, SDL_PropertiesID props)
{
- (void)decoder;
- (void)props;
return SDL_SetError("SDL_image built without ANI support");
}
@@ -694,8 +691,6 @@ bool IMG_CreateANIAnimationEncoder(IMG_AnimationEncoder *encoder, SDL_Properties
bool IMG_CreateANIAnimationEncoder(IMG_AnimationEncoder *encoder, SDL_PropertiesID props)
{
- (void)encoder;
- (void)props;
return SDL_SetError("SDL_image built without ANI save support");
}
diff --git a/src/IMG_anim_encoder.c b/src/IMG_anim_encoder.c
index d46bd5f76..a491c7df4 100644
--- a/src/IMG_anim_encoder.c
+++ b/src/IMG_anim_encoder.c
@@ -202,7 +202,6 @@ Uint64 IMG_GetEncoderDuration(IMG_AnimationEncoder *encoder, Uint64 duration, Ui
static void SDLCALL HasMetadataCallback(void *userdata, SDL_PropertiesID props, const char *name)
{
- (void)props;
bool *has_metadata = (bool *)userdata;
if (SDL_strncmp(name, "SDL_image.metadata.", 19) == 0) {
diff --git a/src/IMG_avif.c b/src/IMG_avif.c
index eae7f1dec..ccd1a4d1f 100644
--- a/src/IMG_avif.c
+++ b/src/IMG_avif.c
@@ -248,8 +248,6 @@ static avifResult ReadAVIFIO(struct avifIO * io, uint32_t readFlags, uint64_t of
{
avifIOContext *context = (avifIOContext *)io->data;
- (void) readFlags; /* not used */
-
/* The AVIF reader bounces all over, so always seek to the correct offset */
if (SDL_SeekIO(context->src, context->start + offset, SDL_IO_SEEK_SET) < 0) {
return AVIF_RESULT_IO_ERROR;
@@ -720,14 +718,12 @@ static bool IMG_SaveAVIF_IO_libavif(SDL_Surface *surface, SDL_IOStream *dst, int
/* See if an image is contained in a data source */
bool IMG_isAVIF(SDL_IOStream *src)
{
- (void)src;
return false;
}
/* Load a AVIF type image from an SDL datasource */
SDL_Surface *IMG_LoadAVIF_IO(SDL_IOStream *src)
{
- (void)src;
SDL_SetError("SDL_image built without AVIF support");
return NULL;
}
@@ -772,18 +768,11 @@ bool IMG_SaveAVIF(SDL_Surface *surface, const char *file, int quality)
bool IMG_SaveAVIF_IO(SDL_Surface *surface, SDL_IOStream *dst, bool closeio, int quality)
{
- (void)surface;
- (void)dst;
- (void)closeio;
- (void)quality;
return SDL_SetError("SDL_image built without AVIF save support");
}
bool IMG_SaveAVIF(SDL_Surface *surface, const char *file, int quality)
{
- (void)surface;
- (void)file;
- (void)quality;
return SDL_SetError("SDL_image built without AVIF save support");
}
@@ -1186,8 +1175,6 @@ bool IMG_CreateAVIFAnimationDecoder(IMG_AnimationDecoder *decoder, SDL_Propertie
bool IMG_CreateAVIFAnimationDecoder(IMG_AnimationDecoder* decoder, SDL_PropertiesID props)
{
- (void)decoder;
- (void)props;
return SDL_SetError("SDL_image built without AVIF animation support");
}
@@ -1645,8 +1632,6 @@ bool IMG_CreateAVIFAnimationEncoder(IMG_AnimationEncoder *encoder, SDL_Propertie
bool IMG_CreateAVIFAnimationEncoder(IMG_AnimationEncoder *encoder, SDL_PropertiesID props)
{
- (void)encoder;
- (void)props;
return SDL_SetError("SDL_image built without AVIF animation save support");
}
diff --git a/src/IMG_bmp.c b/src/IMG_bmp.c
index 485f4b0cd..b41c090db 100644
--- a/src/IMG_bmp.c
+++ b/src/IMG_bmp.c
@@ -716,26 +716,22 @@ SDL_Surface *IMG_LoadCUR_IO(SDL_IOStream *src)
/* 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;
SDL_SetError("SDL_image built without BMP support");
return NULL;
}
@@ -743,7 +739,6 @@ SDL_Surface *IMG_LoadBMP_IO(SDL_IOStream *src)
/* Load a BMP type image from an SDL datasource */
SDL_Surface *IMG_LoadCUR_IO(SDL_IOStream *src)
{
- (void)src;
SDL_SetError("SDL_image built without BMP support");
return NULL;
}
@@ -751,7 +746,6 @@ SDL_Surface *IMG_LoadCUR_IO(SDL_IOStream *src)
/* Load a BMP type image from an SDL datasource */
SDL_Surface *IMG_LoadICO_IO(SDL_IOStream *src)
{
- (void)src;
SDL_SetError("SDL_image built without BMP support");
return NULL;
}
@@ -925,46 +919,31 @@ bool IMG_SaveICO(SDL_Surface *surface, const char *file)
bool IMG_SaveBMP_IO(SDL_Surface *surface, SDL_IOStream *dst, bool closeio)
{
- (void)surface;
- (void)dst;
- (void)closeio;
return SDL_SetError("SDL_image built without BMP save support");
}
bool IMG_SaveBMP(SDL_Surface *surface, const char *file)
{
- (void)surface;
- (void)file;
return SDL_SetError("SDL_image built without BMP save support");
}
bool IMG_SaveCUR_IO(SDL_Surface *surface, SDL_IOStream *dst, bool closeio)
{
- (void)surface;
- (void)dst;
- (void)closeio;
return SDL_SetError("SDL_image built without BMP save support");
}
bool IMG_SaveCUR(SDL_Surface *surface, const char *file)
{
- (void)surface;
- (void)file;
return SDL_SetError("SDL_image built without BMP save support");
}
bool IMG_SaveICO_IO(SDL_Surface *surface, SDL_IOStream *dst, bool closeio)
{
- (void)surface;
- (void)dst;
- (void)closeio;
return SDL_SetError("SDL_image built without BMP save support");
}
bool IMG_SaveICO(SDL_Surface *surface, const char *file)
{
- (void)surface;
- (void)file;
return SDL_SetError("SDL_image built without BMP save support");
}
diff --git a/src/IMG_gif.c b/src/IMG_gif.c
index 7f2181cd8..be29686f6 100644
--- a/src/IMG_gif.c
+++ b/src/IMG_gif.c
@@ -413,8 +413,6 @@ ReadImage(SDL_IOStream * src, int len, int height, int cmapSize,
int i, v;
int xpos = 0, ypos = 0, pass = 0;
- (void) gray; /* unused */
-
/*
** Initialize the compression routines
*/
@@ -1020,8 +1018,6 @@ bool IMG_CreateGIFAnimationDecoder(IMG_AnimationDecoder *decoder, SDL_Properties
bool IMG_CreateGIFAnimationDecoder(IMG_AnimationDecoder *decoder, SDL_PropertiesID props)
{
- (void)decoder;
- (void)props;
SDL_SetError("SDL_image built without GIF support");
return false;
}
@@ -1077,14 +1073,12 @@ SDL_Surface *IMG_LoadGIF_IO(SDL_IOStream *src)
/* 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;
SDL_SetError("SDL_image built without GIF support");
return NULL;
}
@@ -2858,23 +2852,16 @@ bool IMG_SaveGIF(SDL_Surface *surface, const char *file)
bool IMG_CreateGIFAnimationEncoder(IMG_AnimationEncoder *encoder, SDL_PropertiesID props)
{
- (void)encoder;
- (void)props;
return SDL_SetError("SDL_image built without GIF save support");
}
bool IMG_SaveGIF_IO(SDL_Surface *surface, SDL_IOStream *dst, bool closeio)
{
- (void)surface;
- (void)dst;
- (void)closeio;
return SDL_SetError("SDL_image built without GIF save support");
}
bool IMG_SaveGIF(SDL_Surface *surface, const char *file)
{
- (void)surface;
- (void)file;
return SDL_SetError("SDL_image built without GIF save support");
}
diff --git a/src/IMG_jpg.c b/src/IMG_jpg.c
index df8bebb00..0cd57fe38 100644
--- a/src/IMG_jpg.c
+++ b/src/IMG_jpg.c
@@ -224,7 +224,6 @@ typedef struct {
static void init_source (j_decompress_ptr cinfo)
{
/* We don't actually need to do anything */
- (void)cinfo;
return;
}
@@ -289,7 +288,6 @@ static void skip_input_data (j_decompress_ptr cinfo, long num_bytes)
static void term_source (j_decompress_ptr cinfo)
{
/* We don't actually need to do anything */
- (void)cinfo;
return;
}
@@ -341,7 +339,6 @@ static void my_error_exit(j_common_ptr cinfo)
static void output_no_message(j_common_ptr cinfo)
{
/* do nothing */
- (void)cinfo;
}
struct loadjpeg_vars {
@@ -457,7 +454,6 @@ typedef struct {
static void init_destination(j_compress_ptr cinfo)
{
/* We don't actually need to do anything */
- (void)cinfo;
return;
}
@@ -667,14 +663,12 @@ SDL_Surface *IMG_LoadJPG_IO(SDL_IOStream *src)
/* See if an image is contained in a data source */
bool IMG_isJPG(SDL_IOStream *src)
{
- (void)src;
return false;
}
/* Load a JPEG type image from an SDL datasource */
SDL_Surface *IMG_LoadJPG_IO(SDL_IOStream *src)
{
- (void)src;
SDL_SetError("SDL_image built without JPG support");
return NULL;
}
@@ -763,8 +757,6 @@ static bool IMG_SaveJPG_IO_tinyjpeg(SDL_Surface *surface, SDL_IOStream *dst, int
bool IMG_SaveJPG_IO(SDL_Surface *surface, SDL_IOStream *dst, bool closeio, int quality)
{
bool result = false;
- (void)surface;
- (void)quality;
if (!surface) {
SDL_InvalidParamError("surface");
@@ -808,18 +800,11 @@ bool IMG_SaveJPG(SDL_Surface *surface, const char *file, int quality)
bool IMG_SaveJPG_IO(SDL_Surface *surface, SDL_IOStream *dst, bool closeio, int quality)
{
- (void)surface;
- (void)dst;
- (void)closeio;
- (void)quality;
return SDL_SetError("SDL_image built without JPG save support");
}
bool IMG_SaveJPG(SDL_Surface *surface, const char *file, int quality)
{
- (void)surface;
- (void)file;
- (void)quality;
return SDL_SetError("SDL_image built without JPG save support");
}
diff --git a/src/IMG_jxl.c b/src/IMG_jxl.c
index b1629bb1e..403674593 100644
--- a/src/IMG_jxl.c
+++ b/src/IMG_jxl.c
@@ -255,14 +255,12 @@ SDL_Surface *IMG_LoadJXL_IO(SDL_IOStream *src)
/* See if an image is contained in a data source */
bool IMG_isJXL(SDL_IOStream *src)
{
- (void)src;
return false;
}
/* Load a JXL type image from an SDL datasource */
SDL_Surface *IMG_LoadJXL_IO(SDL_IOStream *src)
{
- (void)src;
SDL_SetError("SDL_image built without JXL support");
return NULL;
}
diff --git a/src/IMG_lbm.c b/src/IMG_lbm.c
index d173d4760..74693e18d 100644
--- a/src/IMG_lbm.c
+++ b/src/IMG_lbm.c
@@ -507,14 +507,12 @@ SDL_Surface *IMG_LoadLBM_IO(SDL_IOStream *src )
/* 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;
SDL_SetError("SDL_image built without LBM support");
return NULL;
}
diff --git a/src/IMG_libpng.c b/src/IMG_libpng.c
index 1f41b531d..44f4498b5 100644
--- a/src/IMG_libpng.c
+++ b/src/IMG_libpng.c
@@ -726,16 +726,11 @@ bool IMG_SavePNG(SDL_Surface *surface, const char *file)
bool IMG_SavePNG_IO(SDL_Surface *surface, SDL_IOStream *dst, bool closeio)
{
- (void)surface;
- (void)dst;
- (void)closeio;
return SDL_SetError("SDL_image built without PNG save support");
}
bool IMG_SavePNG(SDL_Surface *surface, const char *file)
{
- (void)surface;
- (void)file;
return SDL_SetError("SDL_image built without PNG save support");
}
@@ -2455,15 +2450,11 @@ bool IMG_CreateAPNGAnimationEncoder(IMG_AnimationEncoder *encoder, SDL_Propertie
bool IMG_CreateAPNGAnimationEncoder(IMG_AnimationEncoder *encoder, SDL_PropertiesID props)
{
- (void)encoder;
- (void)props;
return SDL_SetError("SDL_image not built against libpng.");
}
bool IMG_CreateAPNGAnimationDecoder(IMG_AnimationDecoder *decoder, SDL_PropertiesID props)
{
- (void)decoder;
- (void)props;
return SDL_SetError("SDL_image not built against libpng.");
}
diff --git a/src/IMG_pcx.c b/src/IMG_pcx.c
index 3ee060bfb..e5e61ff49 100644
--- a/src/IMG_pcx.c
+++ b/src/IMG_pcx.c
@@ -297,14 +297,12 @@ SDL_Surface *IMG_LoadPCX_IO(SDL_IOStream *src)
/* 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;
SDL_SetError("SDL_image built without PCX support");
return NULL;
}
diff --git a/src/IMG_png.c b/src/IMG_png.c
index 65fabc5b7..3a9f64b02 100644
--- a/src/IMG_png.c
+++ b/src/IMG_png.c
@@ -69,14 +69,12 @@ SDL_Surface *IMG_LoadPNG_IO(SDL_IOStream *src)
/* 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;
SDL_SetError("SDL_image built without PNG support");
return NULL;
}
@@ -104,16 +102,11 @@ bool IMG_SavePNG(SDL_Surface *surface, const char *file)
bool IMG_SavePNG_IO(SDL_Surface *surface, SDL_IOStream *dst, bool closeio)
{
- (void)surface;
- (void)dst;
- (void)closeio;
return SDL_SetError("SDL_image built without PNG save support");
}
bool IMG_SavePNG(SDL_Surface *surface, const char *file)
{
- (void)surface;
- (void)file;
return SDL_SetError("SDL_image built without PNG save support");
}
diff --git a/src/IMG_pnm.c b/src/IMG_pnm.c
index 103963117..2739210bd 100644
--- a/src/IMG_pnm.c
+++ b/src/IMG_pnm.c
@@ -257,14 +257,12 @@ SDL_Surface *IMG_LoadPNM_IO(SDL_IOStream *src)
/* 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;
SDL_SetError("SDL_image built without PNM support");
return NULL;
}
diff --git a/src/IMG_qoi.c b/src/IMG_qoi.c
index 957c009c0..344053353 100644
--- a/src/IMG_qoi.c
+++ b/src/IMG_qoi.c
@@ -112,14 +112,12 @@ SDL_Surface *IMG_LoadQOI_IO(SDL_IOStream *src)
/* 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;
SDL_SetError("SDL_image built without QOI support");
return NULL;
}
diff --git a/src/IMG_svg.c b/src/IMG_svg.c
index e163ae6b4..d8e4069d5 100644
--- a/src/IMG_svg.c
+++ b/src/IMG_svg.c
@@ -166,16 +166,12 @@ SDL_Surface *IMG_LoadSizedSVG_IO(SDL_IOStream *src, int width, int height)
/* 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;
SDL_SetError("SDL_image built without SVG support");
return NULL;
}
diff --git a/src/IMG_tga.c b/src/IMG_tga.c
index 933ca9bf7..36121f9d7 100644
--- a/src/IMG_tga.c
+++ b/src/IMG_tga.c
@@ -346,7 +346,6 @@ SDL_Surface *IMG_LoadTGA_IO(SDL_IOStream *src)
/* dummy TGA load routine */
SDL_Surface *IMG_LoadTGA_IO(SDL_IOStream *src)
{
- (void)src;
SDL_SetError("SDL_image built without TGA support");
return NULL;
}
@@ -539,16 +538,11 @@ bool IMG_SaveTGA(SDL_Surface *surface, const char *file)
bool IMG_SaveTGA_IO(SDL_Surface *surface, SDL_IOStream *dst, bool closeio)
{
- (void)surface;
- (void)dst;
- (void)closeio;
return SDL_SetError("SDL_image built without TGA save support");
}
bool IMG_SaveTGA(SDL_Surface *surface, const char *file)
{
- (void)surface;
- (void)file;
return SDL_SetError("SDL_image built without TGA save support");
}
diff --git a/src/IMG_tif.c b/src/IMG_tif.c
index 4d5a970a1..b4fa247a7 100644
--- a/src/IMG_tif.c
+++ b/src/IMG_tif.c
@@ -104,7 +104,6 @@ static tsize_t tiff_write(thandle_t fd, tdata_t buf, tsize_t size)
static int tiff_close(thandle_t fd)
{
- (void)fd;
/*
* We don't want libtiff closing our SDL_IOStream*, but if it's not given
* a routine to try, and if the image isn't a TIFF, it'll segfault.
@@ -114,17 +113,11 @@ static int tiff_close(thandle_t fd)
static int tiff_map(thandle_t fd, tdata_t* pbase, toff_t* psize)
{
- (void)fd;
- (void)pbase;
- (void)psize;
return (0);
}
static void tiff_unmap(thandle_t fd, tdata_t base, toff_t size)
{
- (void)fd;
- (void)base;
- (void)size;
return;
}
@@ -222,14 +215,12 @@ SDL_Surface* IMG_LoadTIF_IO(SDL_IOStream * src)
/* See if an image is contained in a data source */
bool IMG_isTIF(SDL_IOStream *src)
{
- (void)src;
return false;
}
/* Load a TIFF type image from an SDL datasource */
SDL_Surface *IMG_LoadTIF_IO(SDL_IOStream *src)
{
- (void)src;
SDL_SetError("SDL_image built without TIFF support");
return NULL;
}
diff --git a/src/IMG_webp.c b/src/IMG_webp.c
index 0a8b25008..ccd22caa5 100644
--- a/src/IMG_webp.c
+++ b/src/IMG_webp.c
@@ -1060,22 +1060,18 @@ bool IMG_CreateWEBPAnimationEncoder(IMG_AnimationEncoder *encoder, SDL_Propertie
/* See if an image is contained in a data source */
bool IMG_isWEBP(SDL_IOStream *src)
{
- (void)src;
return false;
}
/* Load a WEBP type image from an SDL datasource */
SDL_Surface *IMG_LoadWEBP_IO(SDL_IOStream *src)
{
- (void)src;
SDL_SetError("SDL_image built without WEBP support");
return NULL;
}
bool IMG_CreateWEBPAnimationDecoder(IMG_AnimationDecoder *decoder, SDL_PropertiesID props)
{
- (void)decoder;
- (void)props;
return SDL_SetError("SDL_image built without WEBP support");
}
@@ -1085,25 +1081,16 @@ bool IMG_CreateWEBPAnimationDecoder(IMG_AnimationDecoder *decoder, SDL_Propertie
bool IMG_SaveWEBP_IO(SDL_Surface *surface, SDL_IOStream *dst, bool closeio, float quality)
{
- (void)surface;
- (void)dst;
- (void)closeio;
- (void)quality;
return SDL_SetError("SDL_image built without WEBP save support");
}
bool IMG_SaveWEBP(SDL_Surface *surface, const char *file, float quality)
{
- (void)surface;
- (void)file;
- (void)quality;
return SDL_SetError("SDL_image built without WEBP save support");
}
bool IMG_CreateWEBPAnimationEncoder(IMG_AnimationEncoder *encoder, SDL_PropertiesID props)
{
- (void)encoder;
- (void)props;
return SDL_SetError("SDL_image built without WEBP save support");
}
diff --git a/src/IMG_xcf.c b/src/IMG_xcf.c
index 837a05dab..986de6752 100644
--- a/src/IMG_xcf.c
+++ b/src/IMG_xcf.c
@@ -597,9 +597,6 @@ static void free_xcf_tile(unsigned char *t)
static unsigned char *load_xcf_tile_none (SDL_IOStream *src, size_t len, int bpp, int x, int y)
{
unsigned char *load = NULL;
- (void)bpp;
- (void)x;
- (void)y;
load = (unsigned char *)SDL_malloc(len);
if (load != NULL) {
@@ -1034,14 +1031,12 @@ SDL_Surface *IMG_LoadXCF_IO(SDL_IOStream *src)
/* 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;
SDL_SetError("SDL_image built without XCF support");
return NULL;
}
diff --git a/src/IMG_xpm.c b/src/IMG_xpm.c
index a3def915c..a23b8f452 100644
--- a/src/IMG_xpm.c
+++ b/src/IMG_xpm.c
@@ -1212,28 +1212,24 @@ SDL_Surface *IMG_ReadXPMFromArrayToRGB888(char **xpm)
/* 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;
SDL_SetError("SDL_image built without XPM support");
return NULL;
}
SDL_Surface *IMG_ReadXPMFromArray(char **xpm)
{
- (void)xpm;
SDL_SetError("SDL_image built without XPM support");
return NULL;
}
SDL_Surface *IMG_ReadXPMFromArrayToRGB888(char **xpm)
{
- (void)xpm;
SDL_SetError("SDL_image built without XPM support");
return NULL;
}
diff --git a/src/IMG_xv.c b/src/IMG_xv.c
index 2e36c47f8..455742876 100644
--- a/src/IMG_xv.c
+++ b/src/IMG_xv.c
@@ -152,14 +152,12 @@ SDL_Surface *IMG_LoadXV_IO(SDL_IOStream *src)
/* 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;
SDL_SetError("SDL_image built without XV support");
return NULL;
}
diff --git a/src/IMG_xxx.c b/src/IMG_xxx.c
index 509c0a8f2..ead14a716 100644
--- a/src/IMG_xxx.c
+++ b/src/IMG_xxx.c
@@ -71,13 +71,11 @@ SDL_Surface *IMG_LoadXXX_IO(SDL_IOStream *src)
bool IMG_isXXX(SDL_IOStream *src)
{
- (void)src;
return false;
}
SDL_Surface *IMG_LoadXXX_IO(SDL_IOStream *src)
{
- (void)src;
SDL_SetError("SDL_image built without XXX support");
return NULL;
}