commit:     46ae3b8e567d43a891f8818bb92b6258b412e07e
Author:     NHOrus <jy6x2b32pie9 <AT> yahoo <DOT> com>
AuthorDate: Sun Jan 26 15:18:18 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Feb 10 08:54:22 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=46ae3b8e

games-util/qstat: Remove bad function pointer cast, C23 porting

Existing function pointer is already of correct type, any additional
casting is superfluous, and in this case lacks argument types.
Safely removed.
Added strnstr to whitelist of QA checks for implicit declarations:
there is a fallback implementation, safe to ignore

Closes: https://bugs.gentoo.org/899024
Bug: https://bugs.gentoo.org/944360
Signed-off-by: NHOrus <jy6x2b32pie9 <AT> yahoo.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 games-util/qstat/Manifest                                  |  1 +
 games-util/qstat/files/qstat-2.14-unneeded-cast.patch      | 14 ++++++++++++++
 .../qstat/{qstat-2.14.ebuild => qstat-2.14-r1.ebuild}      | 13 +++++++++----
 3 files changed, 24 insertions(+), 4 deletions(-)

diff --git a/games-util/qstat/Manifest b/games-util/qstat/Manifest
index c61dfd63739f..02338ff54a78 100644
--- a/games-util/qstat/Manifest
+++ b/games-util/qstat/Manifest
@@ -1 +1,2 @@
 DIST qstat-2.14.tar.gz 210440 BLAKE2B 
2a33287a69fe63c59a1cb136e84ea29cccd27f4468cb4b38b4e9ce49f28a558dc67793eaa7ead7addd828730e084a15f9684ccba7753852ce1c2795c7c94cb78
 SHA512 
f2054d74399fe1773a19ca43629e10364fdd87e551459719685c11f38245a05906631b456848b1a3764b4e6843baf654af6a9b174c7b16908b6bcb97ac64c6d6
+DIST qstat-2.17.tar.gz 233981 BLAKE2B 
e66aad52931443183ad91b19d5ed775c78babb0a5bd679c57fdf4c0ef604aab4e071bd16f97d151b84eb0b9b9814da271342a3494ec4123c5cf0ca10a8786341
 SHA512 
880549d220a9a9046910bc2e5564b09349870110c77249b66d2ca77143327c83473da31c00e7b70df45f48e6a5bcb3310487f73983d745a69e6aa6278a125278

diff --git a/games-util/qstat/files/qstat-2.14-unneeded-cast.patch 
b/games-util/qstat/files/qstat-2.14-unneeded-cast.patch
new file mode 100644
index 000000000000..c1bf19b502c5
--- /dev/null
+++ b/games-util/qstat/files/qstat-2.14-unneeded-cast.patch
@@ -0,0 +1,14 @@
+packet_funcs are already have correct type, no need to cast function pointer 
to wrong
+function pointer
+https://bugs.gentoo.org/944360
+--- a/packet_manip.c
++++ b/packet_manip.c
+@@ -131,7 +131,7 @@
+               }
+               // Call the server's packet processing method flagging as a 
combine call
+               server->combined = 1;
+-              ret = ((int (*)())server->type->packet_func)(server, combined, 
datalen);
++              ret = (server->type->packet_func)(server, combined, datalen);
+               free(combined);
+               server->combined = 0;
+ 

diff --git a/games-util/qstat/qstat-2.14.ebuild 
b/games-util/qstat/qstat-2.14-r1.ebuild
similarity index 75%
rename from games-util/qstat/qstat-2.14.ebuild
rename to games-util/qstat/qstat-2.14-r1.ebuild
index 5de977de37a5..33da72b64bfd 100644
--- a/games-util/qstat/qstat-2.14.ebuild
+++ b/games-util/qstat/qstat-2.14-r1.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
 inherit autotools
 
@@ -14,12 +14,17 @@ SLOT="0"
 KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ppc64 x86"
 IUSE="debug"
 
-DEPEND="!sys-cluster/torque"
+RDEPEND="!sys-cluster/torque"
 
 DOCS=( CHANGES.txt COMPILE.txt template/README.txt )
 
 PATCHES=(
-       "${FILESDIR}"/${P}-gcc-10.patch
+       "${FILESDIR}"/"${P}"-gcc-10.patch
+       "${FILESDIR}"/"${P}"-unneeded-cast.patch
+)
+
+QA_CONFIG_IMPL_DECL_SKIP=(
+       strnstr #bug #899024, there's fallback implementation
 )
 
 src_prepare() {

Reply via email to