From 32613b152e9abf3997eb45992453c2a1b5af34b9 Mon Sep 17 00:00:00 2001 From: Taras Chornyi Date: Thu, 22 Sep 2016 11:22:40 +0100 Subject: [PATCH] dpdkstat: Fixed issue with unused var when configured w/o debug Signed-off-by: Taras Chornyi --- src/dpdkstat.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dpdkstat.c b/src/dpdkstat.c index 58425437..dc3e7dfd 100644 --- a/src/dpdkstat.c +++ b/src/dpdkstat.c @@ -147,12 +147,14 @@ static void dpdk_config_init_default(void) { static int dpdk_config(oconfig_item_t *ci) { int port_counter = 0; - char errbuf[ERR_BUF_SIZE]; /* Allocate g_configuration and * initialize a POSIX SHared Memory (SHM) object. */ int err = dpdk_shm_init(sizeof(dpdk_config_t)); if (err) { +#if COLLECT_DEBUG + char errbuf[ERR_BUF_SIZE]; +#endif DEBUG("dpdkstat: error in shm_init, %s", sstrerror(errno, errbuf, sizeof(errbuf))); return -1; -- 2.11.0