From 5ff80e887a99a192bab3339c4339f8202733f031 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sat, 19 Mar 2016 22:18:50 +0000 Subject: [PATCH] Remove support for compile-time loglevel. Setting the compile-time loglevel to a non-default value (i.e., greater than zero) results in many compile time warnings due to unused variables. These are not easy to fix, and the feature isn't very important anyway. Remove it. --- para.h | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/para.h b/para.h index f08d43a8..12d23639 100644 --- a/para.h +++ b/para.h @@ -240,49 +240,12 @@ enum sample_format {SAMPLE_FORMATS}; /** Number of all loglevels. */ #define NUM_LOGLEVELS 7 -/** Log messages with lower priority than that will not be compiled in. */ -#define COMPILE_TIME_LOGLEVEL 0 - /** \cond log */ -#if LL_DEBUG >= COMPILE_TIME_LOGLEVEL #define PARA_DEBUG_LOG(f,...) para_log(LL_DEBUG, "%s: " f, __FUNCTION__, ## __VA_ARGS__) -#else -#define PARA_DEBUG_LOG(...) do {;} while (0) -#endif - -#if LL_INFO >= COMPILE_TIME_LOGLEVEL #define PARA_INFO_LOG(f,...) para_log(LL_INFO, "%s: " f, __FUNCTION__, ## __VA_ARGS__) -#else -#define PARA_INFO_LOG(...) do {;} while (0) -#endif - -#if LL_NOTICE >= COMPILE_TIME_LOGLEVEL #define PARA_NOTICE_LOG(f,...) para_log(LL_NOTICE, "%s: " f, __FUNCTION__, ## __VA_ARGS__) -#else -#define PARA_NOTICE_LOG(...) do {;} while (0) -#endif - -#if LL_WARNING >= COMPILE_TIME_LOGLEVEL #define PARA_WARNING_LOG(f,...) para_log(LL_WARNING, "%s: " f, __FUNCTION__, ## __VA_ARGS__) -#else -#define PARA_WARNING_LOG(...) do {;} while (0) -#endif - -#if LL_ERROR >= COMPILE_TIME_LOGLEVEL #define PARA_ERROR_LOG(f,...) para_log(LL_ERROR, "%s: " f, __FUNCTION__, ## __VA_ARGS__) -#else -#define PARA_ERROR_LOG(...) do {;} while (0) -#endif - -#if LL_CRIT >= COMPILE_TIME_LOGLEVEL #define PARA_CRIT_LOG(f,...) para_log(LL_CRIT, "%s: " f, __FUNCTION__, ## __VA_ARGS__) -#else -#define PARA_CRIT_LOG(...) do {;} while (0) -#endif - -#if LL_EMERG >= COMPILE_TIME_LOGLEVEL #define PARA_EMERG_LOG(f,...) para_log(LL_EMERG, "%s: " f, __FUNCTION__, ## __VA_ARGS__) -#else -#define PARA_EMERG_LOG(...) -#endif /** \endcond log */ -- 2.39.5