[pkg-opensc-commit] [opensc] 213/295: Add GCC format checking attributes to minidriver logging function

Eric Dorland eric at moszumanska.debian.org
Sat Jun 24 21:11:33 UTC 2017


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

eric pushed a commit to branch master
in repository opensc.

commit 1a073d5683a1e786e61d425cf2bdd364d6decf9b
Author: Maciej S. Szmigiero <mail at maciej.szmigiero.name>
Date:   Fri Sep 30 23:05:17 2016 +0200

    Add GCC format checking attributes to minidriver logging function
    
    Commit "Add GCC format checking attributes to log functions" added format
    and parameter checking to OpenSC log functions.
    Minidriver, however, logs most of its output via a dedicated log function,
    so this function needs such attributes, too.
    
    Signed-off-by: Maciej S. Szmigiero <mail at maciej.szmigiero.name>
---
 src/minidriver/minidriver.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/minidriver/minidriver.c b/src/minidriver/minidriver.c
index 0cecb94..846c01c 100644
--- a/src/minidriver/minidriver.c
+++ b/src/minidriver/minidriver.c
@@ -247,6 +247,11 @@ static DWORD md_fs_init(PCARD_DATA pCardData);
 #define snprintf _snprintf
 #endif
 
+#if defined(__GNUC__)
+static void logprintf(PCARD_DATA pCardData, int level, const char* format, ...)
+	__attribute__ ((format (SC_PRINTF_FORMAT, 3, 4)));
+#endif
+
 static void logprintf(PCARD_DATA pCardData, int level, _Printf_format_string_ const char* format, ...)
 {
 	va_list arg;

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



More information about the pkg-opensc-commit mailing list