Fix build with GCC 4.5.

This commit is contained in:
joerg 2014-01-07 09:28:57 +00:00
parent ff2955473b
commit 844399f6ed

View File

@ -1,4 +1,4 @@
/* $Id: log.c,v 1.3 2014/01/07 02:11:29 joerg Exp $ */ /* $Id: log.c,v 1.4 2014/01/07 09:28:57 joerg Exp $ */
/* /*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -105,7 +105,9 @@ log_vwrite(int pri, const char *msg, va_list ap)
} }
/* Log a warning with error string. */ /* Log a warning with error string. */
#if __GNUC_PREREQ__(4, 6) || defined(__clang__)
#pragma GCC diagnostic push #pragma GCC diagnostic push
#endif
#pragma GCC diagnostic ignored "-Wformat-nonliteral" #pragma GCC diagnostic ignored "-Wformat-nonliteral"
void printflike1 void printflike1
log_warn(const char *msg, ...) log_warn(const char *msg, ...)
@ -120,7 +122,9 @@ log_warn(const char *msg, ...)
free(fmt); free(fmt);
va_end(ap); va_end(ap);
} }
#if __GNUC_PREREQ__(4, 6) || defined(__clang__)
#pragma GCC diagnostic push #pragma GCC diagnostic push
#endif
/* Log a warning. */ /* Log a warning. */
void printflike1 void printflike1