From 6a110b3849adc677215211f0b8e74c9913ed1a94 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sat, 9 Mar 2013 00:59:29 +0100 Subject: [PATCH] Creating log_internal.h for log_*put_internal() prototypes Fixed warning "no previous prototype for function" in log_posix.c --- libnfc/log.c | 7 ++----- libnfc/log.h | 2 ++ libnfc/log_posix.c | 5 +---- libnfc/log_win32.c | 5 +---- 4 files changed, 6 insertions(+), 13 deletions(-) diff --git a/libnfc/log.c b/libnfc/log.c index d845227..6f12491 100644 --- a/libnfc/log.c +++ b/libnfc/log.c @@ -73,11 +73,8 @@ log_priority_to_str(const int priority) #ifdef LOG -// Internal methods so different platforms can route the logging -// Offering both forms of the variadic function -// These are implemented in the log_ specific file -void log_put_internal(const char *format, ...); -void log_vput_internal(const char *format, va_list args); + +#include "log_internal.h" void log_init(const nfc_context *context) diff --git a/libnfc/log.h b/libnfc/log.h index d3604fa..05c3f34 100644 --- a/libnfc/log.h +++ b/libnfc/log.h @@ -70,6 +70,8 @@ void log_put(const uint8_t group, const char *category, const uint8_t priority, __attribute__((format(printf, 4, 5))) # endif ; +void log_put_internal(const char *format, ...); +void log_vput_internal(const char *format, va_list args); #else // No logging diff --git a/libnfc/log_posix.c b/libnfc/log_posix.c index 3e963d2..3f483dd 100644 --- a/libnfc/log_posix.c +++ b/libnfc/log_posix.c @@ -17,11 +17,8 @@ * along with this program. If not, see */ -#include "log.h" +#include "log_internal.h" -#include -#include -#include #include #include diff --git a/libnfc/log_win32.c b/libnfc/log_win32.c index d4fba60..adeb729 100644 --- a/libnfc/log_win32.c +++ b/libnfc/log_win32.c @@ -17,11 +17,8 @@ * along with this program. If not, see */ -#include "log.h" +#include "log_internal.h" -#include -#include -#include #include #include #include