From 8f13c8c446101db5364115a008142a379ba5edee Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Mon, 6 Mar 2023 15:50:32 +0300
Subject: [PATCH] IMG_xxx.c is never meant for building: clean that up...
---
Android.mk | 4 +---
CMakeLists.txt | 1 -
IMG_xxx.c | 25 ++++++++++++++---------
VisualC/SDL_image.vcxproj | 1 -
VisualC/SDL_image.vcxproj.filters | 3 ---
Xcode/SDL_image.xcodeproj/project.pbxproj | 6 ------
6 files changed, 16 insertions(+), 24 deletions(-)
diff --git a/Android.mk b/Android.mk
index 0d5e7b89..42588d08 100644
--- a/Android.mk
+++ b/Android.mk
@@ -90,8 +90,7 @@ LOCAL_SRC_FILES := \
IMG_WIC.c \
IMG_xcf.c \
IMG_xpm.c.arm \
- IMG_xv.c \
- IMG_xxx.c
+ IMG_xv.c
LOCAL_CFLAGS := -DLOAD_BMP -DLOAD_GIF -DLOAD_LBM -DLOAD_PCX -DLOAD_PNM \
-DLOAD_SVG -DLOAD_TGA -DLOAD_XCF -DLOAD_XPM -DLOAD_XV \
@@ -166,4 +165,3 @@ LOCAL_LDLIBS :=
LOCAL_EXPORT_LDLIBS :=
include $(BUILD_STATIC_LIBRARY)
-
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7409980b..44553bff 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -209,7 +209,6 @@ add_library(SDL2_image
IMG_xcf.c
IMG_xpm.c
IMG_xv.c
- IMG_xxx.c
)
add_library(SDL2_image::${sdl2_image_export_name} ALIAS SDL2_image)
target_include_directories(SDL2_image PUBLIC
diff --git a/IMG_xxx.c b/IMG_xxx.c
index 5ccf66d2..b8e6e41a 100644
--- a/IMG_xxx.c
+++ b/IMG_xxx.c
@@ -31,58 +31,63 @@ int IMG_isXXX(SDL_RWops *src)
int start;
int is_XXX;
- if ( !src )
+ if (!src) {
return 0;
+ }
+
start = SDL_RWtell(src);
is_XXX = 0;
/* Detect the image here */
SDL_RWseek(src, start, RW_SEEK_SET);
- return(is_XXX);
+ return is_XXX;
}
-/* Load a XXX type image from an SDL datasource */
+/* Load an XXX type image from an SDL datasource */
SDL_Surface *IMG_LoadXXX_RW(SDL_RWops *src)
{
int start;
const char *error = NULL;
SDL_Surface *surface = NULL;
- if ( !src ) {
+ if (!src) {
/* The error message has been set in SDL_RWFromFile */
return NULL;
}
+
start = SDL_RWtell(src);
/* Load the image here */
- if ( error ) {
+ if (error) {
SDL_RWseek(src, start, RW_SEEK_SET);
- if ( surface ) {
+ if (surface) {
SDL_FreeSurface(surface);
surface = NULL;
}
IMG_SetError("%s", error);
}
+
return surface;
}
#else
+
#if _MSC_VER >= 1300
#pragma warning(disable : 4100) /* warning C4100: 'op' : unreferenced formal parameter */
#endif
-/* See if an image is contained in a data source */
int IMG_isXXX(SDL_RWops *src)
{
- return(0);
+ (void) src;
+ return 0;
}
-/* Load a XXX type image from an SDL datasource */
SDL_Surface *IMG_LoadXXX_RW(SDL_RWops *src)
{
- return(NULL);
+ (void) src;
+ return NULL;
}
#endif /* LOAD_XXX */
diff --git a/VisualC/SDL_image.vcxproj b/VisualC/SDL_image.vcxproj
index 97c5dca1..48ad1e49 100644
--- a/VisualC/SDL_image.vcxproj
+++ b/VisualC/SDL_image.vcxproj
@@ -226,7 +226,6 @@
<ClCompile Include="..\IMG_xcf.c" />
<ClCompile Include="..\IMG_xpm.c" />
<ClCompile Include="..\IMG_xv.c" />
- <ClCompile Include="..\IMG_xxx.c" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Version.rc" />
diff --git a/VisualC/SDL_image.vcxproj.filters b/VisualC/SDL_image.vcxproj.filters
index f7ca5822..1bdf0661 100644
--- a/VisualC/SDL_image.vcxproj.filters
+++ b/VisualC/SDL_image.vcxproj.filters
@@ -43,9 +43,6 @@
<ClCompile Include="..\IMG_xv.c">
<Filter>Sources</Filter>
</ClCompile>
- <ClCompile Include="..\IMG_xxx.c">
- <Filter>Sources</Filter>
- </ClCompile>
<ClCompile Include="..\IMG_svg.c">
<Filter>Sources</Filter>
</ClCompile>
diff --git a/Xcode/SDL_image.xcodeproj/project.pbxproj b/Xcode/SDL_image.xcodeproj/project.pbxproj
index 70513694..4b60fd3d 100644
--- a/Xcode/SDL_image.xcodeproj/project.pbxproj
+++ b/Xcode/SDL_image.xcodeproj/project.pbxproj
@@ -40,8 +40,6 @@
AA579E0B161C07E7005F809B /* IMG_xpm.c in Sources */ = {isa = PBXBuildFile; fileRef = AA579DEE161C07E6005F809B /* IMG_xpm.c */; };
AA579E0C161C07E7005F809B /* IMG_xv.c in Sources */ = {isa = PBXBuildFile; fileRef = AA579DEF161C07E6005F809B /* IMG_xv.c */; };
AA579E0D161C07E7005F809B /* IMG_xv.c in Sources */ = {isa = PBXBuildFile; fileRef = AA579DEF161C07E6005F809B /* IMG_xv.c */; };
- AA579E0E161C07E7005F809B /* IMG_xxx.c in Sources */ = {isa = PBXBuildFile; fileRef = AA579DF0161C07E6005F809B /* IMG_xxx.c */; };
- AA579E0F161C07E7005F809B /* IMG_xxx.c in Sources */ = {isa = PBXBuildFile; fileRef = AA579DF0161C07E6005F809B /* IMG_xxx.c */; };
AA579E10161C07E7005F809B /* IMG.c in Sources */ = {isa = PBXBuildFile; fileRef = AA579DF1161C07E6005F809B /* IMG.c */; };
AA579E11161C07E7005F809B /* IMG.c in Sources */ = {isa = PBXBuildFile; fileRef = AA579DF1161C07E6005F809B /* IMG.c */; };
AADBAC89175C6B4C004F8ED2 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 007288A60F0DA79800C302A9 /* ApplicationServices.framework */; platformFilters = (macos, ); };
@@ -146,7 +144,6 @@
AA579DED161C07E6005F809B /* IMG_xcf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = IMG_xcf.c; path = ../IMG_xcf.c; sourceTree = "<group>"; };
AA579DEE161C07E6005F809B /* IMG_xpm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = IMG_xpm.c; path = ../IMG_xpm.c; sourceTree = "<group>"; };
AA579DEF161C07E6005F809B /* IMG_xv.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = IMG_xv.c; path = ../IMG_xv.c; sourceTree = "<group>"; };
- AA579DF0161C07E6005F809B /* IMG_xxx.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = IMG_xxx.c; path = ../IMG_xxx.c; sourceTree = "<group>"; };
AA579DF1161C07E6005F809B /* IMG.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = IMG.c; path = ../IMG.c; sourceTree = "<group>"; };
BE1FA72D07AF4C44004B6283 /* Info-Framework.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Info-Framework.plist"; sourceTree = "<group>"; };
BE1FA72E07AF4C45004B6283 /* SDL2_image.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SDL2_image.framework; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -262,7 +259,6 @@
AA579DED161C07E6005F809B /* IMG_xcf.c */,
AA579DEE161C07E6005F809B /* IMG_xpm.c */,
AA579DEF161C07E6005F809B /* IMG_xv.c */,
- AA579DF0161C07E6005F809B /* IMG_xxx.c */,
);
name = "Library Source";
sourceTree = "<group>";
@@ -579,7 +575,6 @@
AA579E0A161C07E7005F809B /* IMG_xpm.c in Sources */,
F354743E2828CA66007E9EDA /* IMG_jxl.c in Sources */,
AA579E0C161C07E7005F809B /* IMG_xv.c in Sources */,
- AA579E0E161C07E7005F809B /* IMG_xxx.c in Sources */,
AA579E10161C07E7005F809B /* IMG.c in Sources */,
AA50AA471F9C7C50003B9C0C /* IMG_svg.c in Sources */,
F31094C3282AE42D008EF641 /* IMG_stb.c in Sources */,
@@ -607,7 +602,6 @@
AA579E0B161C07E7005F809B /* IMG_xpm.c in Sources */,
F354743F2828CA66007E9EDA /* IMG_jxl.c in Sources */,
AA579E0D161C07E7005F809B /* IMG_xv.c in Sources */,
- AA579E0F161C07E7005F809B /* IMG_xxx.c in Sources */,
AA579E11161C07E7005F809B /* IMG.c in Sources */,
AA23FC7D20A2A1B90017DFB9 /* IMG_svg.c in Sources */,
F31094C4282AE42D008EF641 /* IMG_stb.c in Sources */,