File: ftbfs_gcc15.patch

package info (click to toggle)
qstat 2.17-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,220 kB
  • sloc: ansic: 24,706; makefile: 86; perl: 78; sh: 62
file content (21 lines) | stat: -rw-r--r-- 772 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
From: NHOrus <jy6x2b32pie9@yahoo.com>
Date: Sun, 26 Jan 2025 19:18:18 +0400
Subject: 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

--- 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;