mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 07:11:41 +00:00
[build] Autoconfiscate printf format attribute
I don't know if gnu_printf is appropriate for all cases, but it is needed for mingw32.
This commit is contained in:
parent
7c788a6e7a
commit
a9bd436837
38 changed files with 93 additions and 78 deletions
|
@ -1,5 +1,6 @@
|
|||
endian=""
|
||||
FNM_FLAGS=""
|
||||
|
||||
case "$host_os" in
|
||||
mingw32*)
|
||||
mingw=yes
|
||||
|
@ -7,11 +8,12 @@ case "$host_os" in
|
|||
if test "x$host" != "x$build"; then
|
||||
case "$build_os" in
|
||||
cygwin*)
|
||||
CFLAGS="$CFLAGS -mno-cygwin -mconsole"
|
||||
CFLAGS="$CFLAGS -mno-cygwin -mconsole -D__USE_MINGW_ANSI_STDIO"
|
||||
CPPFLAGS="$CPPFLAGS $CFLAGS"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
AC_DEFINE(NEED_GNUPRINTF)
|
||||
endian="little"
|
||||
;;
|
||||
cygwin*)
|
||||
|
@ -26,3 +28,12 @@ case "$host_os" in
|
|||
;;
|
||||
esac
|
||||
AC_SUBST(FNM_FLAGS)
|
||||
|
||||
AH_VERBATIM([NEED_GNUPRINTF],
|
||||
[/* Define this if gnu_prinf is needed instead of printf for format attributes*/
|
||||
#undef NEED_GNUPRINTF
|
||||
#ifdef NEED_GNUPRINTF
|
||||
# define PRINTF gnu_printf
|
||||
#else
|
||||
# define PRINTF printf
|
||||
#endif])
|
||||
|
|
|
@ -109,7 +109,7 @@ binop_t *cexpr_find_cast (exprtype_t *dst_type, exprtype_t *src_type) __attribut
|
|||
exprval_t *cexpr_value (exprtype_t *type, exprctx_t *ctx);
|
||||
exprval_t *cexpr_value_reference (exprtype_t *type, void *data, exprctx_t *ctx);
|
||||
int cexpr_eval_string (const char *str, exprctx_t *context);
|
||||
void cexpr_error(exprctx_t *ctx, const char *fmt, ...) __attribute__((format(printf,2,3)));
|
||||
void cexpr_error(exprctx_t *ctx, const char *fmt, ...) __attribute__((format(PRINTF,2,3)));
|
||||
|
||||
void cexpr_struct_getfield (const exprval_t *a, const exprval_t *b,
|
||||
exprval_t *c, exprctx_t *ctx);
|
||||
|
|
|
@ -92,8 +92,8 @@ extern struct console_data_s con_data;
|
|||
void Con_CheckResize (void);
|
||||
void Con_DrawConsole (void);
|
||||
|
||||
void Con_Printf (const char *fmt, ...) __attribute__((format(printf, 1, 2)));
|
||||
void Con_Print (const char *fmt, va_list args) __attribute__((format(printf, 1, 0)));
|
||||
void Con_Printf (const char *fmt, ...) __attribute__((format(PRINTF, 1, 2)));
|
||||
void Con_Print (const char *fmt, va_list args) __attribute__((format(PRINTF, 1, 0)));
|
||||
void Con_ToggleConsole_f (void);
|
||||
|
||||
// wrapper function to attempt to either complete the command line
|
||||
|
@ -105,7 +105,7 @@ void Con_BasicCompleteCommandLine (inputline_t *il);
|
|||
// Generic libs/util/console.c function to display a list
|
||||
// formatted in columns on the console
|
||||
void Con_DisplayList(const char **list, int con_linewidth);
|
||||
extern void (*con_list_print)(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
|
||||
extern void (*con_list_print)(const char *fmt, ...) __attribute__((format(PRINTF, 1, 2)));
|
||||
|
||||
inputline_t *Con_CreateInputLine (int lines, int lsize, char prompt);
|
||||
void Con_DestroyInputLine (inputline_t *inputline);
|
||||
|
|
|
@ -164,15 +164,15 @@ void dstring_clearstr (dstring_t *dstr);
|
|||
/** Formatted printing to dstrings. Existing data is replaced by the formatted
|
||||
string.
|
||||
*/
|
||||
char *dvsprintf (dstring_t *dstr, const char *fmt, va_list args) __attribute__((format(printf,2,0)));
|
||||
char *dsprintf (dstring_t *dstr, const char *fmt, ...) __attribute__((format(printf,2,3)));
|
||||
char *dvsprintf (dstring_t *dstr, const char *fmt, va_list args) __attribute__((format(PRINTF,2,0)));
|
||||
char *dsprintf (dstring_t *dstr, const char *fmt, ...) __attribute__((format(PRINTF,2,3)));
|
||||
///@}
|
||||
///@{
|
||||
/** Formatted printing to dstrings. Formatted string is appened to the dstring.
|
||||
Embedded nulls in the dstring are ignored.
|
||||
*/
|
||||
char *davsprintf (dstring_t *dstr, const char *fmt, va_list args) __attribute__((format(printf,2,0)));
|
||||
char *dasprintf (dstring_t *dstr, const char *fmt, ...) __attribute__((format(printf,2,3)));
|
||||
char *davsprintf (dstring_t *dstr, const char *fmt, va_list args) __attribute__((format(PRINTF,2,0)));
|
||||
char *dasprintf (dstring_t *dstr, const char *fmt, ...) __attribute__((format(PRINTF,2,3)));
|
||||
///@}
|
||||
|
||||
///@}
|
||||
|
|
|
@ -182,7 +182,7 @@ extern char * const gib_null_string;
|
|||
#define GIB_CanReturn() (GIB_DATA(cbuf_active)->waitret)
|
||||
|
||||
dstring_t *GIB_Return (const char *str);
|
||||
void GIB_Error (const char *type, const char *fmt, ...) __attribute__((format(printf, 2, 3)));
|
||||
void GIB_Error (const char *type, const char *fmt, ...) __attribute__((format(PRINTF, 2, 3)));
|
||||
void GIB_Builtin_Add (const char *name, void (*func) (void));
|
||||
void GIB_Builtin_Remove (const char *name);
|
||||
qboolean GIB_Builtin_Exists (const char *name);
|
||||
|
|
|
@ -500,7 +500,7 @@ int PL_ParseLabeledArray (const plfield_t *field, const plitem_t *dict,
|
|||
*/
|
||||
int PL_ParseSymtab (const plfield_t *field, const plitem_t *dict,
|
||||
void *data, plitem_t *messages, void *context);
|
||||
void __attribute__((format(printf,3,4)))
|
||||
void __attribute__((format(PRINTF,3,4)))
|
||||
PL_Message (plitem_t *messages, const plitem_t *item, const char *fmt, ...);
|
||||
|
||||
///@}
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include <QF/plugin.h>
|
||||
#include <QF/qtypes.h>
|
||||
|
||||
typedef void (*P_C_Print) (const char *fmt, va_list args) __attribute__((format(printf, 1, 0)));
|
||||
typedef void (*P_C_Print) (const char *fmt, va_list args) __attribute__((format(PRINTF, 1, 0)));
|
||||
typedef void (*P_C_ProcessInput) (void);
|
||||
typedef void (*P_C_KeyEvent) (knum_t key, short unicode, qboolean down);
|
||||
typedef void (*P_C_DrawConsole) (void);
|
||||
|
|
|
@ -64,8 +64,8 @@ void PR_Init (progs_t *pr);
|
|||
*/
|
||||
void PR_Init_Cvars (void);
|
||||
|
||||
void PR_Error (progs_t *pr, const char *error, ...) __attribute__((format(printf,2,3), noreturn));
|
||||
void PR_RunError (progs_t *pr, const char *error, ...) __attribute__((format(printf,2,3), noreturn));
|
||||
void PR_Error (progs_t *pr, const char *error, ...) __attribute__((format(PRINTF,2,3), noreturn));
|
||||
void PR_RunError (progs_t *pr, const char *error, ...) __attribute__((format(PRINTF,2,3), noreturn));
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ QFile *Qsubopen (const char *path, int offs, int len, int zip);
|
|||
void Qclose(QFile *file);
|
||||
int Qread(QFile *file, void *buf, int count);
|
||||
int Qwrite(QFile *file, const void *buf, int count);
|
||||
int Qprintf(QFile *file, const char *fmt, ...) __attribute__((format(printf,2,3)));
|
||||
int Qprintf(QFile *file, const char *fmt, ...) __attribute__((format(PRINTF,2,3)));
|
||||
int Qputs(QFile *file, const char *buf);
|
||||
char *Qgets(QFile *file, char *buf, int count);
|
||||
int Qgetc(QFile *file);
|
||||
|
|
|
@ -62,7 +62,7 @@ int Sys_FileExists (const char *path);
|
|||
int Sys_isdir (const char *path);
|
||||
int Sys_mkdir (const char *path);
|
||||
|
||||
typedef void (*sys_printf_t) (const char *fmt, va_list args) __attribute__((format(printf, 1, 0)));
|
||||
typedef void (*sys_printf_t) (const char *fmt, va_list args) __attribute__((format(PRINTF, 1, 0)));
|
||||
typedef void (*sys_error_t) (void *data);
|
||||
|
||||
sys_printf_t Sys_SetStdPrintf (sys_printf_t func);
|
||||
|
@ -71,10 +71,10 @@ sys_printf_t Sys_SetErrPrintf (sys_printf_t func);
|
|||
void Sys_PushErrorHandler (sys_error_t func, void *data);
|
||||
void Sys_PopErrorHandler (void);
|
||||
|
||||
void Sys_Print (FILE *stream, const char *fmt, va_list args) __attribute__((format(printf, 2, 0)));
|
||||
void Sys_Printf (const char *fmt, ...) __attribute__((format(printf,1,2)));
|
||||
void Sys_Error (const char *error, ...) __attribute__((format(printf,1,2), noreturn));
|
||||
void Sys_FatalError (const char *error, ...) __attribute__((format(printf,1,2), noreturn));
|
||||
void Sys_Print (FILE *stream, const char *fmt, va_list args) __attribute__((format(PRINTF, 2, 0)));
|
||||
void Sys_Printf (const char *fmt, ...) __attribute__((format(PRINTF,1,2)));
|
||||
void Sys_Error (const char *error, ...) __attribute__((format(PRINTF,1,2), noreturn));
|
||||
void Sys_FatalError (const char *error, ...) __attribute__((format(PRINTF,1,2), noreturn));
|
||||
void Sys_Quit (void) __attribute__((noreturn));
|
||||
void Sys_Shutdown (void);
|
||||
void Sys_RegisterShutdown (void (*func) (void *), void *data);
|
||||
|
@ -82,7 +82,7 @@ int64_t Sys_LongTime (void);
|
|||
double Sys_DoubleTime (void);
|
||||
void Sys_TimeOfDay(date_t *date);
|
||||
|
||||
void Sys_MaskPrintf (int mask, const char *fmt, ...) __attribute__((format(printf,2,3)));
|
||||
void Sys_MaskPrintf (int mask, const char *fmt, ...) __attribute__((format(PRINTF,2,3)));
|
||||
// remember to update developer_flags in cvar.c
|
||||
#define SYS_DEV (1|0)
|
||||
#define SYS_WARN (1|2) // bit 0 so developer 1 will pick it up
|
||||
|
@ -129,7 +129,7 @@ void *Sys_Alloc (size_t size);
|
|||
//
|
||||
// system IO
|
||||
//
|
||||
void Sys_DebugLog(const char *file, const char *fmt, ...) __attribute__((format(printf,2,3)));
|
||||
void Sys_DebugLog(const char *file, const char *fmt, ...) __attribute__((format(PRINTF,2,3)));
|
||||
|
||||
#define SYS_CHECKMEM(x) \
|
||||
do { \
|
||||
|
|
|
@ -73,7 +73,7 @@ void va_destroy_context (va_ctx_t *ctx);
|
|||
* to va sent to a 4th) with a reduced risk of strings being
|
||||
* trampled.
|
||||
*/
|
||||
char *va(va_ctx_t *ctx, const char *format, ...) __attribute__((format(printf,2,3)));
|
||||
char *va(va_ctx_t *ctx, const char *format, ...) __attribute__((format(PRINTF,2,3)));
|
||||
|
||||
/** Does a varargs printf into a malloced buffer.
|
||||
*
|
||||
|
@ -88,7 +88,7 @@ char *va(va_ctx_t *ctx, const char *format, ...) __attribute__((format(printf,2,
|
|||
* trampled. In addition, it does not use va(), so combining
|
||||
* nva() with va() is safe.
|
||||
*/
|
||||
char *nva(const char *format, ...) __attribute__((format(printf,1,2)));
|
||||
char *nva(const char *format, ...) __attribute__((format(PRINTF,1,2)));
|
||||
|
||||
///@}
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ void GIB_Buffer_Push_Sstack (struct cbuf_s *cbuf);
|
|||
void GIB_Buffer_Pop_Sstack (struct cbuf_s *cbuf);
|
||||
dstring_t *GIB_Buffer_Dsarray_Get (struct cbuf_s *cbuf);
|
||||
void GIB_Buffer_Reply_Callback (int argc, const char **argv, void *data);
|
||||
void GIB_Buffer_Error (cbuf_t *cbuf, const char *type, const char *fmt, va_list args) __attribute__((format(printf, 3, 0)));
|
||||
void GIB_Buffer_Error (cbuf_t *cbuf, const char *type, const char *fmt, va_list args) __attribute__((format(PRINTF, 3, 0)));
|
||||
|
||||
extern struct cbuf_interpreter_s gib_interp;
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ extern struct msg_s *net_message;
|
|||
extern struct cvar_s *qport;
|
||||
|
||||
int Net_Log_Init (const char **sound_precache);
|
||||
void Net_LogPrintf (const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
|
||||
void Net_LogPrintf (const char *fmt, ...) __attribute__ ((format (PRINTF, 1, 2)));
|
||||
void Log_Incoming_Packet (const byte *p, int len, int has_sequence,
|
||||
int is_server);
|
||||
void Log_Outgoing_Packet (const byte *p, int len, int has_sequence,
|
||||
|
@ -332,7 +332,7 @@ void Netchan_OutOfBand (netadr_t adr, int length, byte *data);
|
|||
\param format The printf style format string.
|
||||
*/
|
||||
void Netchan_OutOfBandPrint (netadr_t adr, const char *format, ...)
|
||||
__attribute__ ((format (printf,2,3)));
|
||||
__attribute__ ((format (PRINTF,2,3)));
|
||||
|
||||
/** Process a packet for the specifiied connection.
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
const char * Q_strcasestr (const char *haystack, const char *needle) __attribute__((pure));
|
||||
size_t Q_strnlen (const char *s, size_t maxlen) __attribute__((pure));
|
||||
size_t Q_snprintfz (char *dest, size_t size, const char *fmt, ...) __attribute__((format(printf,3,4)));
|
||||
size_t Q_snprintfz (char *dest, size_t size, const char *fmt, ...) __attribute__((format(PRINTF,3,4)));
|
||||
size_t Q_vsnprintfz (char *dest, size_t size, const char *fmt, va_list argptr);
|
||||
|
||||
#endif // string_h
|
||||
|
|
|
@ -360,7 +360,7 @@ Linefeed (void)
|
|||
All console printing must go through this in order to be logged to disk
|
||||
If no console is visible, the notify window will pop up.
|
||||
*/
|
||||
static __attribute__((format(printf, 1, 0))) void
|
||||
static __attribute__((format(PRINTF, 1, 0))) void
|
||||
C_Print (const char *fmt, va_list args)
|
||||
{
|
||||
char *s;
|
||||
|
|
|
@ -711,7 +711,7 @@ C_shutdown (void)
|
|||
#endif
|
||||
}
|
||||
|
||||
static __attribute__((format(printf, 1, 0))) void
|
||||
static __attribute__((format(PRINTF, 1, 0))) void
|
||||
C_Print (const char *fmt, va_list args)
|
||||
{
|
||||
static dstring_t *buffer;
|
||||
|
|
|
@ -104,7 +104,7 @@ NET_Ban_f (void)
|
|||
{
|
||||
char addrStr[32]; //FIXME: overflow
|
||||
char maskStr[32]; //FIXME: overflow
|
||||
__attribute__((format(printf, 1, 2))) void (*print) (const char *fmt, ...);
|
||||
__attribute__((format(PRINTF, 1, 2))) void (*print) (const char *fmt, ...);
|
||||
|
||||
if (cmd_source == src_command) {
|
||||
if (!sv.active) {
|
||||
|
|
|
@ -297,7 +297,7 @@ dstring_clearstr (dstring_t *dstr)
|
|||
dstr->str[0] = 0;
|
||||
}
|
||||
|
||||
static __attribute__((format(printf, 3, 0))) char *
|
||||
static __attribute__((format(PRINTF, 3, 0))) char *
|
||||
_dvsprintf (dstring_t *dstr, int offs, const char *fmt, va_list args)
|
||||
{
|
||||
int size;
|
||||
|
|
|
@ -90,8 +90,8 @@
|
|||
|
||||
#include "compat.h"
|
||||
|
||||
static void Sys_StdPrintf (const char *fmt, va_list args) __attribute__((format(printf, 1, 0)));
|
||||
static void Sys_ErrPrintf (const char *fmt, va_list args) __attribute__((format(printf, 1, 0)));
|
||||
static void Sys_StdPrintf (const char *fmt, va_list args) __attribute__((format(PRINTF, 1, 0)));
|
||||
static void Sys_ErrPrintf (const char *fmt, va_list args) __attribute__((format(PRINTF, 1, 0)));
|
||||
|
||||
VISIBLE cvar_t *sys_nostdout;
|
||||
VISIBLE cvar_t *sys_extrasleep;
|
||||
|
|
|
@ -72,7 +72,7 @@ QFV_CreateRenderPass (qfv_device_t *device,
|
|||
qfv_devfuncs_t *dfunc = device->funcs;
|
||||
|
||||
if (developer->int_val & SYS_VULKAN) {
|
||||
Sys_Printf ("attachments: %ld\n", attachments->size);
|
||||
Sys_Printf ("attachments: %zd\n", attachments->size);
|
||||
for (size_t i = 0; i < attachments->size; i++) {
|
||||
Sys_Printf (" attachment: %zd\n", i);
|
||||
Sys_Printf (" flags: %x\n", attachments->a[i].flags);
|
||||
|
@ -89,7 +89,7 @@ QFV_CreateRenderPass (qfv_device_t *device,
|
|||
Sys_Printf (" finalLayout: %d\n",
|
||||
attachments->a[i].finalLayout);
|
||||
}
|
||||
Sys_Printf ("subpassparams: %ld\n", subpassparams->size);
|
||||
Sys_Printf ("subpassparams: %zd\n", subpassparams->size);
|
||||
for (size_t i = 0; i < subpassparams->size; i++) {
|
||||
VkSubpassDescription *sp = &subpassparams->a[i];
|
||||
Sys_Printf (" flags: %x\n", sp->flags);
|
||||
|
@ -126,7 +126,7 @@ QFV_CreateRenderPass (qfv_device_t *device,
|
|||
Sys_Printf (" %d\n", sp->pPreserveAttachments[j]);
|
||||
}
|
||||
}
|
||||
Sys_Printf ("dependencies: %ld\n", dependencies->size);
|
||||
Sys_Printf ("dependencies: %zd\n", dependencies->size);
|
||||
for (size_t i = 0; i < dependencies->size; i++) {
|
||||
Sys_Printf (" srcSubpass: %d\n", dependencies->a[i].srcSubpass);
|
||||
Sys_Printf (" dstSubpass: %d\n", dependencies->a[i].dstSubpass);
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -162,7 +166,7 @@ qfv_device_t device = {
|
|||
funcs:&dfuncs,
|
||||
};
|
||||
|
||||
static void __attribute__ ((format (printf, 2, 3), noreturn))
|
||||
static void __attribute__ ((format (PRINTF, 2, 3), noreturn))
|
||||
_error (int line, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
|
|
@ -1086,7 +1086,7 @@ Key_IMT_Keydest_f (void)
|
|||
key_targets[kd].active = imt;
|
||||
}
|
||||
|
||||
static void __attribute__((format(printf,2,3)))
|
||||
static void __attribute__((format(PRINTF,2,3)))
|
||||
key_printf (QFile *f, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
|
|
@ -62,11 +62,11 @@ void Host_ServerFrame (void);
|
|||
void Host_InitCommands (void);
|
||||
void Host_Init (void);
|
||||
void Host_Shutdown(void *data);
|
||||
void Host_Error (const char *error, ...) __attribute__((format(printf,1,2), noreturn));
|
||||
void Host_EndGame (const char *message, ...) __attribute__((format(printf,1,2), noreturn));
|
||||
void Host_Error (const char *error, ...) __attribute__((format(PRINTF,1,2), noreturn));
|
||||
void Host_EndGame (const char *message, ...) __attribute__((format(PRINTF,1,2), noreturn));
|
||||
void Host_Frame (float time);
|
||||
void Host_Quit_f (void) __attribute__((noreturn));
|
||||
void Host_ClientCommands (const char *fmt, ...) __attribute__((format(printf,1,2)));
|
||||
void Host_ClientCommands (const char *fmt, ...) __attribute__((format(PRINTF,1,2)));
|
||||
void Host_ShutdownServer (qboolean crash);
|
||||
|
||||
#endif // __host_h
|
||||
|
|
|
@ -264,8 +264,8 @@ void SV_AddUpdates (void);
|
|||
void SV_ClientThink (void);
|
||||
void SV_AddClientToServer (struct qsocket_s *ret);
|
||||
|
||||
void SV_ClientPrintf (const char *fmt, ...) __attribute__((format(printf,1,2)));
|
||||
void SV_BroadcastPrintf (const char *fmt, ...) __attribute__((format(printf,1,2)));
|
||||
void SV_ClientPrintf (const char *fmt, ...) __attribute__((format(PRINTF,1,2)));
|
||||
void SV_BroadcastPrintf (const char *fmt, ...) __attribute__((format(PRINTF,1,2)));
|
||||
|
||||
struct trace_s SV_PushEntity (edict_t *ent, vec3_t push);
|
||||
int SV_EntCanSupportJump (edict_t *ent) __attribute__((pure));
|
||||
|
|
|
@ -79,7 +79,7 @@ Host_Status_f (void)
|
|||
int minutes;
|
||||
int hours = 0;
|
||||
int j;
|
||||
__attribute__((format(printf, 1, 2))) void (*print) (const char *fmt, ...);
|
||||
__attribute__((format(PRINTF, 1, 2))) void (*print) (const char *fmt, ...);
|
||||
|
||||
if (cmd_source == src_command) {
|
||||
if (!sv.active) {
|
||||
|
|
|
@ -65,7 +65,7 @@ struct client_s;
|
|||
Calling qtv_begin_redirect() before, and qtv_end_redirect() after a series
|
||||
of calls will redirect output.
|
||||
*/
|
||||
void qtv_printf (const char *fmt, ...) __attribute__((format(printf,1,2)));
|
||||
void qtv_printf (const char *fmt, ...) __attribute__((format(PRINTF,1,2)));
|
||||
|
||||
/** Begin redirection of console printing.
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@ redirect_t qtv_redirected;
|
|||
client_t *qtv_redirect_client;
|
||||
dstring_t outputbuf = {&dstring_default_mem};
|
||||
|
||||
static __attribute__((format(printf, 1, 0))) void
|
||||
static __attribute__((format(PRINTF, 1, 0))) void
|
||||
qtv_print (const char *fmt, va_list args)
|
||||
{
|
||||
static int pending;
|
||||
|
|
|
@ -51,11 +51,11 @@ void Host_ServerFrame (void);
|
|||
void Host_InitCommands (void);
|
||||
void Host_Init (void);
|
||||
void Host_Shutdown(void *data);
|
||||
void Host_Error (const char *error, ...) __attribute__((format(printf,1,2), noreturn));
|
||||
void Host_EndGame (const char *message, ...) __attribute__((format(printf,1,2), noreturn));
|
||||
void Host_Error (const char *error, ...) __attribute__((format(PRINTF,1,2), noreturn));
|
||||
void Host_EndGame (const char *message, ...) __attribute__((format(PRINTF,1,2), noreturn));
|
||||
void Host_Frame (float time);
|
||||
void Host_Quit_f (void);
|
||||
void Host_ClientCommands (const char *fmt, ...) __attribute__((format(printf,1,2)));
|
||||
void Host_ClientCommands (const char *fmt, ...) __attribute__((format(PRINTF,1,2)));
|
||||
void Host_ShutdownServer (qboolean crash);
|
||||
|
||||
typedef struct
|
||||
|
|
|
@ -474,8 +474,8 @@ void SV_Progs_Init_Cvars (void);
|
|||
void SV_PR_Cmds_Init (void);
|
||||
void SV_LoadProgs (void);
|
||||
|
||||
void Con_Printf (const char *fmt, ...) __attribute__((format(printf,1,2)));
|
||||
void Con_DPrintf (const char *fmt, ...) __attribute__((format(printf,1,2)));
|
||||
void Con_Printf (const char *fmt, ...) __attribute__((format(PRINTF,1,2)));
|
||||
void Con_DPrintf (const char *fmt, ...) __attribute__((format(PRINTF,1,2)));
|
||||
|
||||
extern struct clip_hull_s *pf_hull_list[];
|
||||
|
||||
|
@ -554,17 +554,17 @@ int SV_EntCanSupportJump (struct edict_s *ent) __attribute__((pure));
|
|||
//
|
||||
// sv_send.c
|
||||
//
|
||||
void SV_Print (const char *fmt, va_list args) __attribute__((format(printf, 1, 0)));
|
||||
void SV_Printf (const char *fmt, ...) __attribute__((format(printf,1,2)));
|
||||
void SV_Print (const char *fmt, va_list args) __attribute__((format(PRINTF, 1, 0)));
|
||||
void SV_Printf (const char *fmt, ...) __attribute__((format(PRINTF,1,2)));
|
||||
void SV_SendClientMessages (void);
|
||||
void SV_GetStats (struct edict_s *ent, int spectator, int stats[]);
|
||||
|
||||
void SV_Multicast (const vec3_t origin, int to);
|
||||
void SV_StartSound (struct edict_s *entity, int channel, const char *sample,
|
||||
int volume, float attenuation);
|
||||
void SV_ClientPrintf (int recorder, client_t *cl, int level, const char *fmt, ...) __attribute__((format(printf,4,5)));
|
||||
void SV_BroadcastPrintf (int level, const char *fmt, ...) __attribute__((format(printf,2,3)));
|
||||
void SV_BroadcastCommand (const char *fmt, ...) __attribute__((format(printf,1,2)));
|
||||
void SV_ClientPrintf (int recorder, client_t *cl, int level, const char *fmt, ...) __attribute__((format(PRINTF,4,5)));
|
||||
void SV_BroadcastPrintf (int level, const char *fmt, ...) __attribute__((format(PRINTF,2,3)));
|
||||
void SV_BroadcastCommand (const char *fmt, ...) __attribute__((format(PRINTF,1,2)));
|
||||
void SV_SendMessagesToAll (void);
|
||||
void SV_FindModelNumbers (void);
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
# endif
|
||||
#endif
|
||||
|
||||
static void __attribute__ ((format (printf, 1, 2)))
|
||||
static void __attribute__ ((format (PRINTF, 1, 2)))
|
||||
ma_log (const char *fmt, ...);
|
||||
|
||||
#ifdef HAVE_IN_PKTINFO
|
||||
|
@ -514,7 +514,7 @@ main (int argc, char **argv)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void __attribute__ ((format (printf, 1, 2)))
|
||||
static void __attribute__ ((format (PRINTF, 1, 2)))
|
||||
ma_log (const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
|
|
@ -255,7 +255,7 @@ SV_Shutdown (void *data)
|
|||
Sends a datagram to all the clients informing them of the server crash,
|
||||
then exits
|
||||
*/
|
||||
static __attribute__((format(printf, 1, 0))) void
|
||||
static __attribute__((format(PRINTF, 1, 0))) void
|
||||
SV_Error (const char *error, va_list argptr)
|
||||
{
|
||||
static qboolean inerror = false;
|
||||
|
|
|
@ -109,7 +109,7 @@ cvar_t *sv_timecheck_decay;
|
|||
|
||||
cvar_t *sv_http_url_base;
|
||||
|
||||
static void OutofBandPrintf (netadr_t where, const char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
|
||||
static void OutofBandPrintf (netadr_t where, const char *fmt, ...) __attribute__ ((format (PRINTF, 2, 3)));
|
||||
|
||||
// USER STRINGCMD EXECUTION host_client and sv_player will be valid.
|
||||
|
||||
|
|
|
@ -2004,7 +2004,7 @@ static builtin_t builtins[] = {
|
|||
|
||||
static FILE *logfile;
|
||||
|
||||
static __attribute__((format(printf, 1, 0))) void
|
||||
static __attribute__((format(PRINTF, 1, 0))) void
|
||||
qwaq_print (const char *fmt, va_list args)
|
||||
{
|
||||
vfprintf (logfile, fmt, args);
|
||||
|
|
|
@ -111,7 +111,7 @@ extern struct brushset_s *brushset;
|
|||
|
||||
Behaves the same as printf except it prints only when verbose is true.
|
||||
*/
|
||||
void qprintf (const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
|
||||
void qprintf (const char *fmt, ...) __attribute__ ((format (PRINTF, 1, 2)));
|
||||
|
||||
extern int valid;
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ int numdetailbrushes;
|
|||
|
||||
script_t *map_script;
|
||||
|
||||
static void __attribute__ ((format (printf, 1, 2), noreturn))
|
||||
static void __attribute__ ((format (PRINTF, 1, 2), noreturn))
|
||||
map_error (const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
|
|
@ -46,31 +46,31 @@ extern diagnostic_hook notice_hook;
|
|||
|
||||
struct expr_s *_error (struct expr_s *e, const char *file, int line,
|
||||
const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 4, 5)));
|
||||
__attribute__ ((format (PRINTF, 4, 5)));
|
||||
#define error(e, fmt...) _error(e, __FILE__, __LINE__, fmt)
|
||||
|
||||
void _internal_error (struct expr_s *e, const char *file, int line,
|
||||
const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 4, 5), noreturn));
|
||||
__attribute__ ((format (PRINTF, 4, 5), noreturn));
|
||||
#define internal_error(e, fmt...) _internal_error(e, __FILE__, __LINE__, fmt)
|
||||
|
||||
struct expr_s *_warning (struct expr_s *e, const char *file, int line,
|
||||
const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 4, 5)));
|
||||
__attribute__ ((format (PRINTF, 4, 5)));
|
||||
#define warning(e, fmt...) _warning(e, __FILE__, __LINE__, fmt)
|
||||
|
||||
struct expr_s *_notice (struct expr_s *e, const char *file, int line,
|
||||
const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 4, 5)));
|
||||
__attribute__ ((format (PRINTF, 4, 5)));
|
||||
#define notice(e, fmt...) _notice(e, __FILE__, __LINE__, fmt)
|
||||
|
||||
void _debug (struct expr_s *e, const char *file, int line,
|
||||
const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 4, 5)));
|
||||
__attribute__ ((format (PRINTF, 4, 5)));
|
||||
#define debug(e, fmt...) _debug(e, __FILE__, __LINE__, fmt)
|
||||
|
||||
void _bug (struct expr_s *e, const char *file, int line, const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 4, 5)));
|
||||
__attribute__ ((format (PRINTF, 4, 5)));
|
||||
#define bug(e, fmt...) _bug(e, __FILE__, __LINE__, fmt)
|
||||
|
||||
///@}
|
||||
|
|
|
@ -77,7 +77,7 @@ report_function (expr_t *e)
|
|||
last_func = current_func;
|
||||
}
|
||||
|
||||
static __attribute__((format(printf, 4, 0))) void
|
||||
static __attribute__((format(PRINTF, 4, 0))) void
|
||||
format_message (dstring_t *message, const char *msg_type, expr_t *e,
|
||||
const char *fmt, va_list args)
|
||||
{
|
||||
|
@ -95,7 +95,7 @@ format_message (dstring_t *message, const char *msg_type, expr_t *e,
|
|||
}
|
||||
}
|
||||
|
||||
static __attribute__((format(printf, 4, 0))) void
|
||||
static __attribute__((format(PRINTF, 4, 0))) void
|
||||
__warning (expr_t *e, const char *file, int line,
|
||||
const char *fmt, va_list args)
|
||||
{
|
||||
|
@ -146,7 +146,7 @@ _debug (expr_t *e, const char *file, int line, const char *fmt, ...)
|
|||
va_end (args);
|
||||
}
|
||||
|
||||
static __attribute__((noreturn, format(printf, 4, 0))) void
|
||||
static __attribute__((noreturn, format(PRINTF, 4, 0))) void
|
||||
__internal_error (expr_t *e, const char *file, int line,
|
||||
const char *fmt, va_list args)
|
||||
{
|
||||
|
|
|
@ -75,15 +75,15 @@
|
|||
#include "tools/qfcc/include/type.h"
|
||||
|
||||
static void linker_internal_error (const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 1, 2), noreturn));
|
||||
__attribute__ ((format (PRINTF, 1, 2), noreturn));
|
||||
static void linker_error (const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 1, 2)));
|
||||
__attribute__ ((format (PRINTF, 1, 2)));
|
||||
static void linker_warning (const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 1, 2)));
|
||||
__attribute__ ((format (PRINTF, 1, 2)));
|
||||
static void def_error (qfo_def_t *def, const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 2, 3)));
|
||||
__attribute__ ((format (PRINTF, 2, 3)));
|
||||
static void def_warning (qfo_def_t *def, const char *fmt, ...)
|
||||
__attribute__ ((used, format (printf, 2, 3)));
|
||||
__attribute__ ((used, format (PRINTF, 2, 3)));
|
||||
|
||||
/** Safe handling of defs in hash tables and other containers.
|
||||
|
||||
|
|
Loading…
Reference in a new issue