mirror of
https://git.code.sf.net/p/quake/quakeforge-old
synced 2024-11-24 21:01:17 +00:00
enable gcc format checking to our printf style functions and clean up the repercussions (suprisingly few).
This commit is contained in:
parent
03391673eb
commit
0599bb29a7
5 changed files with 13 additions and 3 deletions
|
@ -177,7 +177,11 @@ void COM_StripExtension (char *in, char *out);
|
||||||
void COM_FileBase (char *in, char *out);
|
void COM_FileBase (char *in, char *out);
|
||||||
void COM_DefaultExtension (char *path, char *extension);
|
void COM_DefaultExtension (char *path, char *extension);
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
char *va(char *format, ...) __attribute__((format (printf, 1, 2)));
|
||||||
|
#else
|
||||||
char *va(char *format, ...);
|
char *va(char *format, ...);
|
||||||
|
#endif
|
||||||
// does a varargs printf into a temp buffer
|
// does a varargs printf into a temp buffer
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -62,9 +62,15 @@ void Con_CheckResize (void);
|
||||||
void Con_Init (void);
|
void Con_Init (void);
|
||||||
void Con_DrawConsole (int lines);
|
void Con_DrawConsole (int lines);
|
||||||
void Con_Print (char *txt);
|
void Con_Print (char *txt);
|
||||||
|
#ifdef __GNUC__
|
||||||
|
void Con_Printf (char *fmt, ...) __attribute__((format (printf, 1, 2)));
|
||||||
|
void Con_DPrintf (char *fmt, ...) __attribute__((format (printf, 1, 2)));
|
||||||
|
void Con_SafePrintf (char *fmt, ...) __attribute__((format (printf, 1, 2)));
|
||||||
|
#else
|
||||||
void Con_Printf (char *fmt, ...);
|
void Con_Printf (char *fmt, ...);
|
||||||
void Con_DPrintf (char *fmt, ...);
|
void Con_DPrintf (char *fmt, ...);
|
||||||
void Con_SafePrintf (char *fmt, ...);
|
void Con_SafePrintf (char *fmt, ...);
|
||||||
|
#endif
|
||||||
void Con_Clear_f (void);
|
void Con_Clear_f (void);
|
||||||
void Con_DrawNotify (void);
|
void Con_DrawNotify (void);
|
||||||
void Con_ClearNotify (void);
|
void Con_ClearNotify (void);
|
||||||
|
|
|
@ -595,7 +595,7 @@ R_SetupAliasBlendedFrame (int frame, aliashdr_t *paliashdr, entity_t *e)
|
||||||
{
|
{
|
||||||
e->frame_interval = paliashdr->frames[frame].interval;
|
e->frame_interval = paliashdr->frames[frame].interval;
|
||||||
pose += (int)(cl.time / e->frame_interval) % numposes;
|
pose += (int)(cl.time / e->frame_interval) % numposes;
|
||||||
Con_DPrintf ("0x%x\n", e);
|
Con_DPrintf ("%p\n", e);
|
||||||
Con_DPrintf ("1st: pose = %i pose2 = %i pose1 = %i\n",
|
Con_DPrintf ("1st: pose = %i pose2 = %i pose1 = %i\n",
|
||||||
pose, e->pose2, e->pose1);
|
pose, e->pose2, e->pose1);
|
||||||
} else
|
} else
|
||||||
|
|
|
@ -248,7 +248,7 @@ qboolean SNDDMA_Init(void)
|
||||||
Con_Printf("%5d samplebits\n", shm->samplebits);
|
Con_Printf("%5d samplebits\n", shm->samplebits);
|
||||||
Con_Printf("%5d submission_chunk\n", shm->submission_chunk);
|
Con_Printf("%5d submission_chunk\n", shm->submission_chunk);
|
||||||
Con_Printf("%5d speed\n", shm->speed);
|
Con_Printf("%5d speed\n", shm->speed);
|
||||||
Con_Printf("0x%x dma buffer\n", shm->buffer);
|
Con_Printf("0x%x dma buffer\n", (int)shm->buffer);
|
||||||
Con_Printf("%5d total_channels\n", total_channels);
|
Con_Printf("%5d total_channels\n", total_channels);
|
||||||
|
|
||||||
snd_inited=1;
|
snd_inited=1;
|
||||||
|
|
|
@ -144,7 +144,7 @@ void S_SoundInfo_f(void)
|
||||||
Con_Printf("%5d samplebits\n", shm->samplebits);
|
Con_Printf("%5d samplebits\n", shm->samplebits);
|
||||||
Con_Printf("%5d submission_chunk\n", shm->submission_chunk);
|
Con_Printf("%5d submission_chunk\n", shm->submission_chunk);
|
||||||
Con_Printf("%5d speed\n", shm->speed);
|
Con_Printf("%5d speed\n", shm->speed);
|
||||||
Con_Printf("0x%x dma buffer\n", shm->buffer);
|
Con_Printf("0x%x dma buffer\n", (int)shm->buffer);
|
||||||
Con_Printf("%5d total_channels\n", total_channels);
|
Con_Printf("%5d total_channels\n", total_channels);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue