Use __attribute__((format(printf, ...))) directly
Instead of defining the macro _R_(), define __attribute__() as a macro for compilers that do not support __attribute__(), namely Microsoft Visual Studio. Signed-off-by: Bart Van Assche <bvanassche@acm.org>
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
AM_CPPFLAGS=-I. -I${srcdir}/../include \
|
||||
"-D_U_=__attribute__((unused)) " \
|
||||
"-D_R_(A,B)=__attribute__((format(printf,A,B)))"
|
||||
"-D_U_=__attribute__((unused)) "
|
||||
AM_CFLAGS=$(WARN_CFLAGS)
|
||||
AM_LDFLAGS=-no-undefined
|
||||
LIBS = ../lib/libiscsipriv.la
|
||||
|
||||
@@ -65,7 +65,8 @@ extern int loglevel;
|
||||
#define LOG_SILENT 0
|
||||
#define LOG_NORMAL 1
|
||||
#define LOG_VERBOSE 2
|
||||
void logging(int level, const char *format, ...) _R_(2,3);
|
||||
void logging(int level, const char *format, ...)
|
||||
__attribute__((format(printf, 2, 3)));
|
||||
|
||||
/*
|
||||
* define special flags for logging a blank line, so compiler
|
||||
|
||||
Reference in New Issue
Block a user