From da43e27597e40f5a298ed5c4ae785cc1b36510d4 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sat, 1 May 2010 21:20:30 +0000 Subject: Silence printf(DEH_String(...)) warnings, by providing a DEH_printf function that checks the format string is a valid replacement. Also add DEH_fprintf and DEH_snprintf functions to use throughout the code to do similar checking. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1927 --- src/deh_main.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/deh_main.h') diff --git a/src/deh_main.h b/src/deh_main.h index 6afe07f3..9248e982 100644 --- a/src/deh_main.h +++ b/src/deh_main.h @@ -27,6 +27,8 @@ #ifndef DEH_MAIN_H #define DEH_MAIN_H +#include + #include "doomtype.h" #include "doomfeatures.h" #include "md5.h" @@ -52,10 +54,16 @@ void DEH_Checksum(md5_digest_t digest); #ifdef FEATURE_DEHACKED char *DEH_String(char *s); +void DEH_printf(char *fmt, ...); +void DEH_fprintf(FILE *fstream, char *fmt, ...); +void DEH_snprintf(char *buffer, size_t len, char *fmt, ...); #else #define DEH_String(x) (x) +#define DEH_printf printf +#define DEH_fprintf fprintf +#define DEH_snprintf snprintf #endif -- cgit v1.2.3