include/s_user.h: misc cleanup for compiler warning

s_user.c:1428:26: warning: format string is not a string literal
                  [-Wformat-nonliteral]

Adding the printf attribute to the function will make the compiler
assume that the 'format' argument to the function is a string
literal (by warning about the *callers* of the function *not* using
a string literal), thus avoiding the warning in the function.
This commit is contained in:
Aaron Jones 2017-07-31 04:39:13 +00:00
parent eef58149c7
commit 72fd7c04ac
No known key found for this signature in database
GPG key ID: 8AF0737488AB3012

View file

@ -47,7 +47,8 @@ extern int introduce_client(struct Client *client_p, struct Client *source_p,
struct User *user, const char *nick, int use_euid);
extern void change_nick_user_host(struct Client *target_p, const char *nick, const char *user,
const char *host, int newts, const char *format, ...);
const char *host, int newts, const char *format, ...)
__attribute__((format(printf, 6, 7)));
extern int user_modes[256];
extern unsigned int find_umode_slot(void);