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
This commit is contained in:
@@ -32,6 +32,7 @@
|
|||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
|
||||||
static unsigned char loglvl = L_NUL;
|
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 int logtxtlen = sizeof(logtxt) / sizeof(char*);
|
||||||
|
|
||||||
static FILE *logfp = NULL;
|
static FILE *logfp = NULL;
|
||||||
|
|||||||
@@ -33,7 +33,6 @@
|
|||||||
#define L_NET 0x80
|
#define L_NET 0x80
|
||||||
|
|
||||||
#define LOGTXT "INF, NOT, WAR, ERR, DBG, EBH, EBS, NET, ALL"
|
#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) \
|
#define err_if(exp) \
|
||||||
if (exp) { log_print(L_ERR, "%s: %d: %s: Error %s", \
|
if (exp) { log_print(L_ERR, "%s: %d: %s: Error %s", \
|
||||||
|
|||||||
Reference in New Issue
Block a user