[Pcsclite-cvs-commit] r5854 - /trunk/PCSC/src/PCSC/debuglog.h
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Sat Jul 9 11:10:32 UTC 2011
Author: rousseau
Date: Sat Jul 9 11:10:32 2011
New Revision: 5854
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=5854
Log:
log_msg(): use __attribute__((format(printf, ..))) to check the
parameters passed corresponds to the format string
Modified:
trunk/PCSC/src/PCSC/debuglog.h
Modified: trunk/PCSC/src/PCSC/debuglog.h
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/PCSC/debuglog.h?rev=5854&op=diff
==============================================================================
--- trunk/PCSC/src/PCSC/debuglog.h (original)
+++ trunk/PCSC/src/PCSC/debuglog.h Sat Jul 9 11:10:32 2011
@@ -60,6 +60,10 @@
#define __FUNCTION__ ""
#endif
+#ifndef __GNUC__
+#define __attribute__(x) /*nothing*/
+#endif
+
#ifdef NO_LOG
#define Log0(priority) do { } while(0)
@@ -92,7 +96,9 @@
#endif /* NO_LOG */
-PCSC_API void log_msg(const int priority, const char *fmt, ...);
+PCSC_API void log_msg(const int priority, const char *fmt, ...)
+ __attribute__((format(printf, 2, 3)));
+
PCSC_API void log_xxd(const int priority, const char *msg,
const unsigned char *buffer, const int size);
More information about the Pcsclite-cvs-commit
mailing list