From b52127bcbf817ff8285b36d22198b275327e16bb Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Sun, 16 Dec 2012 17:47:51 -0800 Subject: Cleanup headers and remove all uses of va_list except logging --- src/common/nullpo.cpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'src/common/nullpo.cpp') diff --git a/src/common/nullpo.cpp b/src/common/nullpo.cpp index ad52009..53ed37d 100644 --- a/src/common/nullpo.cpp +++ b/src/common/nullpo.cpp @@ -1,11 +1,14 @@ -#include -#include -#include #include "nullpo.hpp" -static void nullpo_info_core(const char *file, int line, const char *func); +#include // exception to "no va_list" rule +#include +#include + +static +void nullpo_info_core(const char *file, int line, const char *func); __attribute__((format(printf, 4, 0))) -static void nullpo_info_core(const char *file, int line, const char *func, +static +void nullpo_info_core(const char *file, int line, const char *func, const char *fmt, va_list ap); /// Null check and print format @@ -48,7 +51,8 @@ void nullpo_info(const char *file, int line, const char *func) } /// Actual output function -static void nullpo_info_core(const char *file, int line, const char *func) +static +void nullpo_info_core(const char *file, int line, const char *func) { if (!file) file = "??"; @@ -58,7 +62,8 @@ static void nullpo_info_core(const char *file, int line, const char *func) fprintf(stderr, "%s:%d: in func `%s': NULL pointer\n", file, line, func); } -static void nullpo_info_core(const char *file, int line, const char *func, +static +void nullpo_info_core(const char *file, int line, const char *func, const char *fmt, va_list ap) { nullpo_info_core(file, line, func); -- cgit v1.2.3-60-g2f50