Restore format(printf) attribute for powerup_basic
Kreeblah reports that clang now warns for powerup.cpp due to a missing __attribute_format_printf. This was incorrectly dropped inffb653c0b8
. gcc did not warn, but clang now warns. Add back the attribute. Fixes:ffb653c0b8
("Pass control_info & to various functions") Reported-by: Kreeblah <https://github.com/dxx-rebirth/dxx-rebirth/pull/547>
This commit is contained in:
parent
31bb275b0f
commit
a028ea14ae
|
@ -162,6 +162,5 @@ extern void do_megawow_powerup(int quantity);
|
|||
void powerup_basic_str(int redadd, int greenadd, int blueadd, int score, const char *str) __attribute_nonnull();
|
||||
}
|
||||
#endif
|
||||
#define powerup_basic(A1,A2,A3,A4,F,...) dxx_call_printf_checked(powerup_basic,powerup_basic_str,(A1,A2,A3,A4),(F),##__VA_ARGS__)
|
||||
|
||||
#endif
|
||||
|
|
|
@ -140,6 +140,8 @@ static void _powerup_basic_nonhud(int redadd, int greenadd, int blueadd, int sco
|
|||
add_points_to_score(ConsoleObject->ctype.player_info, score);
|
||||
}
|
||||
|
||||
#define powerup_basic(A1,A2,A3,A4,F,...) dxx_call_printf_checked(powerup_basic,powerup_basic_str,(A1,A2,A3,A4),(F),##__VA_ARGS__)
|
||||
__attribute_format_printf(5, 6)
|
||||
void (powerup_basic)(int redadd, int greenadd, int blueadd, int score, const char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
|
Loading…
Reference in a new issue