varnish plugin: avoid unused variable in V5 block
authorMarc Fournier <marc.fournier@camptocamp.com>
Wed, 8 Nov 2017 21:01:26 +0000 (22:01 +0100)
committerMarc Fournier <marc.fournier@camptocamp.com>
Wed, 8 Nov 2017 21:15:43 +0000 (22:15 +0100)
src/varnish.c

index 69daa98..ebc8e7a 100644 (file)
@@ -144,7 +144,6 @@ static int varnish_monitor(void *priv,
 {
   uint64_t val;
   const user_config_t *conf;
 {
   uint64_t val;
   const user_config_t *conf;
-  const char *class;
   const char *name;
 
   if (pt == NULL)
   const char *name;
 
   if (pt == NULL)
@@ -160,9 +159,9 @@ static int varnish_monitor(void *priv,
   strcpy(namebuff, c + 1);
   name = namebuff;
 
   strcpy(namebuff, c + 1);
   name = namebuff;
 
-  (void)class;
-
 #elif HAVE_VARNISH_V4
 #elif HAVE_VARNISH_V4
+  const char *class;
+
   class = pt->section->fantom->type;
   name = pt->desc->name;
 
   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
     return 0;
 
 #elif HAVE_VARNISH_V3
+  const char *class;
+
   class = pt->class;
   name = pt->name;
 
   class = pt->class;
   name = pt->name;