Fix clang cvar build
Add format(printf,...) annotation to varargs functions to move format string checking up one level.
This commit is contained in:
parent
08f7d850e0
commit
8f7d323ec6
|
@ -12,6 +12,7 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#include "dxxsconf.h"
|
||||
|
||||
void cmd_init(void);
|
||||
|
||||
|
@ -22,6 +23,7 @@ void cmd_init(void);
|
|||
|
||||
/* Add some commands to the queue to be executed */
|
||||
void cmd_enqueue(int insert, const char *input);
|
||||
__attribute_format_printf(2, 3)
|
||||
void cmd_enqueuef(int insert, const char *fmt, ...);
|
||||
#define cmd_append(input) cmd_enqueue(0, (input))
|
||||
#define cmd_appendf(...) cmd_enqueuef(0, __VA_ARGS__)
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include <string>
|
||||
#include <physfs.h>
|
||||
#include "maths.h"
|
||||
#include "dxxsconf.h"
|
||||
|
||||
// cvar flags
|
||||
#define CVAR_NONE 0
|
||||
|
@ -57,6 +58,7 @@ void cvar_registervariable (cvar_t &cvar);
|
|||
|
||||
/* Set a CVar's value */
|
||||
void cvar_set_cvar(cvar_t *cvar, const char *value);
|
||||
__attribute_format_printf(2, 3)
|
||||
void cvar_set_cvarf(cvar_t *cvar, const char *fmt, ...);
|
||||
|
||||
/* Equivalent to typing <var_name> <value> at the console */
|
||||
|
|
Loading…
Reference in a new issue