From: Taras Chornyi Date: Thu, 22 Sep 2016 10:22:40 +0000 (+0100) Subject: dpdkstat: Fixed issue with unused var when configured w/o debug X-Git-Tag: collectd-5.7.0~66^2~1 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=32613b152e9abf3997eb45992453c2a1b5af34b9;p=collectd.git dpdkstat: Fixed issue with unused var when configured w/o debug Signed-off-by: Taras Chornyi --- 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;