commit 93809f4b7c7f146ead9ac0e46d21994195dc8e07
Author: Mamoru TASAKA <mtasaka(a)fedoraproject.org>
Date: Sun Oct 13 23:08:52 2024 +0900
Fix -Werror=incompatible-pointer-types , cast return type properly
mamory-0.2.25-type-cast.patch | 76 +++++++++++++++++++++++++++++++++++++++++++
mamory.spec | 7 +++-
2 files changed, 82 insertions(+), 1 deletion(-)
---
diff --git a/mamory-0.2.25-type-cast.patch b/mamory-0.2.25-type-cast.patch
new file mode 100644
index 0000000..394dab0
--- /dev/null
+++ b/mamory-0.2.25-type-cast.patch
@@ -0,0 +1,76 @@
+--- mamory-0.2.25/mamory/admameli.c.debug 2007-08-16 05:35:30.000000000 +0900
++++ mamory-0.2.25/mamory/admameli.c 2024-10-13 09:46:33.752341715 +0900
+@@ -1180,7 +1180,7 @@ s_GameInfo *ReadGameInfo(s_GamesList *Ga
+ else
+ {
+ nbrdata=1;
+- Games=SortBox_FindTheWord(GamesSortBox,
++ Games=(s_GameInfo**)SortBox_FindTheWord(GamesSortBox,
+ GameInfo->More->CloneOf,
+ (int*)&nbrdata);
+ if(nbrdata==1)
+@@ -1852,7 +1852,7 @@ s_GamesList *GetGamesListFromAdMAMEliFil
+ {
+ // printf("Game %s",TempGames[i]->Name);
+ nbrdata=1;
+- Games=SortBox_FindTheWord(GamesSortBox,
++ Games=(s_GameInfo**)SortBox_FindTheWord(GamesSortBox,
+ TempGames[i]->More->CloneOf,
+ (int*)(&nbrdata));
+ if(nbrdata==1)
+@@ -1949,7 +1949,7 @@ s_GamesList *GetGamesListFromAdMAMEliFil
+ if(GamesList->Games[i]->More->RomOf!=NULL)
+ {
+ nbrdata=1;
+- Games=SortBox_FindTheWord(GamesSortBox,
++ Games=(s_GameInfo**)SortBox_FindTheWord(GamesSortBox,
+ GamesList->Games[i]->More->RomOf,
+ (int*)(&nbrdata));
+ if(nbrdata==0)
+@@ -2032,7 +2032,7 @@ s_GamesList *GetGamesListFromAdMAMEliFil
+ GamesList->Games[i]->More->RomOf)!=0)
+ {
+ nbrdata=1;
+- Games=SortBox_FindTheWord(GamesSortBox,
++ Games=(s_GameInfo**)SortBox_FindTheWord(GamesSortBox,
+ GamesList->Games[i]->More->Resource,
+ (int*)(&nbrdata));
+ if(nbrdata==0)
+--- mamory-0.2.25/mamory/amlxml.c.debug 2007-08-16 05:35:30.000000000 +0900
++++ mamory-0.2.25/mamory/amlxml.c 2024-10-13 09:47:53.091520835 +0900
+@@ -1470,7 +1470,7 @@ inGameListStartElementHandler(void *user
+ else
+ {
+ nbrdata=1;
+- Games=SortBox_FindTheWord(Data->GamesSortBox,
++ Games=(s_GameInfo**)SortBox_FindTheWord(Data->GamesSortBox,
+ Data->GameInfo->More->CloneOf,
+ (int*)&nbrdata);
+ if(nbrdata==1)
+@@ -1690,7 +1690,7 @@ s_GamesList *GetGamesListFromAMLXMLFile(
+ {
+ // printf("Game %s",Data->TempGames[i]->Name);
+ nbrdata=1;
+- Games=SortBox_FindTheWord(Data->GamesSortBox,
++ Games=(s_GameInfo**)SortBox_FindTheWord(Data->GamesSortBox,
+ Data->TempGames[i]->More->CloneOf,
+ (int*)(&nbrdata));
+ if(nbrdata==1)
+@@ -1789,7 +1789,7 @@ s_GamesList *GetGamesListFromAMLXMLFile(
+ if(GamesList->Games[i]->More->RomOf!=NULL)
+ {
+ nbrdata=1;
+- Games=SortBox_FindTheWord(Data->GamesSortBox,
++ Games=(s_GameInfo**)SortBox_FindTheWord(Data->GamesSortBox,
+ GamesList->Games[i]->More->RomOf,
+ (int*)(&nbrdata));
+ if(nbrdata==0)
+@@ -1872,7 +1872,7 @@ s_GamesList *GetGamesListFromAMLXMLFile(
+ GamesList->Games[i]->More->RomOf)!=0)
+ {
+ nbrdata=1;
+- Games=SortBox_FindTheWord(Data->GamesSortBox,
++ Games=(s_GameInfo**)SortBox_FindTheWord(Data->GamesSortBox,
+ GamesList->Games[i]->More->Resource,
+ (int*)(&nbrdata));
+ if(nbrdata==0)
diff --git a/mamory.spec b/mamory.spec
index d0b7938..d7bd7e9 100644
--- a/mamory.spec
+++ b/mamory.spec
@@ -1,6 +1,6 @@
Name: mamory
Version: 0.2.25
-Release: 26%{?dist}
+Release: 27%{?dist}
Summary: ROM management API and commandline ROM manager for MAME
License: GPLv2 and LGPLv2
URL:
http://mamory.sourceforge.net
@@ -9,6 +9,7 @@ Patch0: %{name}-opt.patch
Patch1: %{name}-0.2.25-ppc64.patch
Patch2: %{name}-0.2.25-utf8.patch
Patch3: %{name}-0.2.25-fix-inline-use.patch
+Patch4: %{name}-0.2.25-type-cast.patch
BuildRequires: expat-devel
BuildRequires: gcc
@@ -37,6 +38,7 @@ use %{name}.
%patch -P1 -p0 -b .ppc64~
%patch -P2 -p0 -b .utf8~
%patch -P3 -p1
+%patch -P4 -p1 -b .cast
# Avoid lib64 rpaths
sed -i -e 's|"/lib /usr/lib|"/%{_lib} %{_libdir}|' configure
@@ -78,6 +80,9 @@ make check
%changelog
+* Sun Oct 13 2024 Mamoru TASAKA <mtasaka(a)fedoraproject.org> - 0.2.25-27
+- Fix -Werror=incompatible-pointer-types , cast return type properly
+
* Fri Aug 02 2024 RPM Fusion Release Engineering <sergiomb(a)rpmfusion.org> -
0.2.25-26
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild