From: Marc Fournier Date: Wed, 8 Nov 2017 21:01:26 +0000 (+0100) Subject: varnish plugin: avoid unused variable in V5 block X-Git-Tag: collectd-5.8.0~14^2~2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=68123637814ea09efff5bf56f3209eefbe41287a;p=collectd.git varnish plugin: avoid unused variable in V5 block --- diff --git a/src/varnish.c b/src/varnish.c index 69daa980..ebc8e7aa 100644 --- a/src/varnish.c +++ b/src/varnish.c @@ -144,7 +144,6 @@ static int varnish_monitor(void *priv, { uint64_t val; const user_config_t *conf; - const char *class; const char *name; if (pt == NULL) @@ -160,9 +159,9 @@ static int varnish_monitor(void *priv, strcpy(namebuff, c + 1); name = namebuff; - (void)class; - #elif HAVE_VARNISH_V4 + const char *class; + class = pt->section->fantom->type; name = pt->desc->name; @@ -170,6 +169,8 @@ static int varnish_monitor(void *priv, return 0; #elif HAVE_VARNISH_V3 + const char *class; + class = pt->class; name = pt->name;