Skip to content

Fix reloadWhoisFileRun passing an edict_t as printf format - #32

Open
Niehztog wants to merge 1 commit into
packetflinger:mainfrom
Niehztog:fix-whois-printf-args
Open

Niehztog wants to merge 1 commit into
packetflinger:mainfrom
Niehztog:fix-whois-printf-args

Conversation

@Niehztog

Copy link
Copy Markdown
Contributor

q2a_printf() takes (char *fmt, ...), but reloadWhoisFileRun() still passes it gi.cprintf()'s arguments, so the edict_t * lands in the format-string parameter. GCC 14 and newer make that an error (-Wincompatible-pointer-types), so main currently fails to build on Debian 13, Fedora 40+ and Ubuntu 24.10+; on older compilers it is a warning and the pointer reaches vsnprintf at runtime. This restores the gi.cprintf() call it was converted from in c78b84c, which makes main build again (verified with GCC 14, 32-bit Linux target).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants