diff --git a/common/common.h b/common/common.h index 26f49fb..39a6df7 100644 --- a/common/common.h +++ b/common/common.h @@ -177,7 +177,11 @@ void COM_StripExtension (char *in, char *out); void COM_FileBase (char *in, char *out); void COM_DefaultExtension (char *path, char *extension); +#ifdef __GNUC__ +char *va(char *format, ...) __attribute__((format (printf, 1, 2))); +#else char *va(char *format, ...); +#endif // does a varargs printf into a temp buffer diff --git a/common/console.h b/common/console.h index 32eca1e..db982a5 100644 --- a/common/console.h +++ b/common/console.h @@ -62,9 +62,15 @@ void Con_CheckResize (void); void Con_Init (void); void Con_DrawConsole (int lines); 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_DPrintf (char *fmt, ...); void Con_SafePrintf (char *fmt, ...); +#endif void Con_Clear_f (void); void Con_DrawNotify (void); void Con_ClearNotify (void); diff --git a/common/gl_rmain.c b/common/gl_rmain.c index be0ba4c..ff01e46 100644 --- a/common/gl_rmain.c +++ b/common/gl_rmain.c @@ -595,7 +595,7 @@ R_SetupAliasBlendedFrame (int frame, aliashdr_t *paliashdr, entity_t *e) { e->frame_interval = paliashdr->frames[frame].interval; 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", pose, e->pose2, e->pose1); } else diff --git a/common/snd_alsa.c b/common/snd_alsa.c index b8fc7d8..73cd314 100644 --- a/common/snd_alsa.c +++ b/common/snd_alsa.c @@ -248,7 +248,7 @@ qboolean SNDDMA_Init(void) Con_Printf("%5d samplebits\n", shm->samplebits); Con_Printf("%5d submission_chunk\n", shm->submission_chunk); 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); snd_inited=1; diff --git a/common/snd_dma.c b/common/snd_dma.c index 8abd499..5839cb9 100644 --- a/common/snd_dma.c +++ b/common/snd_dma.c @@ -144,7 +144,7 @@ void S_SoundInfo_f(void) Con_Printf("%5d samplebits\n", shm->samplebits); Con_Printf("%5d submission_chunk\n", shm->submission_chunk); 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); }