[ioquake3] 92/136: autoupdater: Fixed up GCC/clang printf function attribute.

Simon McVittie smcv at debian.org
Thu Jun 15 09:09:14 UTC 2017


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian/master
in repository ioquake3.

commit 1aa20487a4b8924bff7343b4a6e8f1a5fa89b837
Author: Ryan C. Gordon <icculus at icculus.org>
Date:   Sat Jun 3 12:02:29 2017 -0400

    autoupdater: Fixed up GCC/clang printf function attribute.
---
 code/autoupdater/autoupdater.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/code/autoupdater/autoupdater.c b/code/autoupdater/autoupdater.c
index eb7937e..0e8392b 100644
--- a/code/autoupdater/autoupdater.c
+++ b/code/autoupdater/autoupdater.c
@@ -75,8 +75,10 @@ typedef pid_t PID;
 
 #if defined(__GNUC__) || defined(__clang__)
 #define NEVER_RETURNS __attribute__((noreturn))
+#define PRINTF_FUNC(fmtargnum, dotargnum) __attribute__ (( format( __printf__, fmtargnum, dotargnum )))
 #else
 #define NEVER_RETURNS
+#define PRINTF_FUNC(fmtargnum, dotargnum)
 #endif
 
 
@@ -134,8 +136,6 @@ static const char *timestamp(void)
 
 static FILE *logfile = NULL;
 
-#define SDL_PRINTF_VARARG_FUNC( fmtargnumber ) __attribute__ (( format( __printf__, fmtargnumber, fmtargnumber+1 )))
-
 static void info(const char *str)
 {
     fputs(str, logfile);
@@ -143,12 +143,7 @@ static void info(const char *str)
     fflush(logfile);
 }
 
-static void infof(const char *fmt, ...)
-#if defined(__GNUC__) || defined(__clang__)
-__attribute__ (( format( __printf__, 1, 2 )))
-#endif
-;
-
+static void infof(const char *fmt, ...) PRINTF_FUNC(1, 2);
 static void infof(const char *fmt, ...)
 {
     va_list ap;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/ioquake3.git



More information about the Pkg-games-commits mailing list