From 68123637814ea09efff5bf56f3209eefbe41287a Mon Sep 17 00:00:00 2001 From: Marc Fournier Date: Wed, 8 Nov 2017 22:01:26 +0100 Subject: [PATCH] varnish plugin: avoid unused variable in V5 block --- src/varnish.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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; -- 2.30.2