From 55fbbdd0825218b792ddf570c92221f5c5857cd1 Mon Sep 17 00:00:00 2001 From: Bee Red Date: Wed, 5 Feb 2014 01:59:31 +0100 Subject: [PATCH] fix: warning move var logtxt[] from log.h to log.c used -Wall for find warning: 'logtxt' defined but not used [-Wunused-variable] logtxt should only exist in log.c every other include of log.h introduce another logtxt which waste space --- lib/log.c | 1 + lib/log.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/log.c b/lib/log.c index 608a4fdc..aa27a58f 100644 --- a/lib/log.c +++ b/lib/log.c @@ -32,6 +32,7 @@ #include "log.h" static unsigned char loglvl = L_NUL; +static const char *logtxt[] = {"INF","NOT","WAR","ERR","DBG","EBH","EBS","NET"}; static int logtxtlen = sizeof(logtxt) / sizeof(char*); static FILE *logfp = NULL; diff --git a/lib/log.h b/lib/log.h index 397882d7..d70d3515 100644 --- a/lib/log.h +++ b/lib/log.h @@ -33,7 +33,6 @@ #define L_NET 0x80 #define LOGTXT "INF, NOT, WAR, ERR, DBG, EBH, EBS, NET, ALL" -static const char *logtxt[] = {"INF","NOT","WAR","ERR","DBG","EBH","EBS","NET"}; #define err_if(exp) \ if (exp) { log_print(L_ERR, "%s: %d: %s: Error %s", \