]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
Fix compiler warning: label defined but not used
authorWolfgang Stöggl <c72578@yahoo.de>
Tue, 30 Apr 2019 14:23:32 +0000 (16:23 +0200)
committerTobias Oetiker <tobi@oetiker.ch>
Tue, 30 Apr 2019 21:15:22 +0000 (23:15 +0200)
- The label 'no_lseek_necessary' is only relevant,
  if HAVE_POSIX_FALLOCATE is defined.
- Fixes the following compiler warning on systems, where
  HAVE_POSIX_FALLOCATE is not defined:
  rrd_open.c:387:3: warning: label 'no_lseek_necessary' defined but not
  used [-Wunused-label]

src/rrd_open.c

index d29853f3ef7b3f144859a0794f374416a8619672..17edd37980336db7e0ceeb8ec4186a10c9a64415 100644 (file)
@@ -384,7 +384,9 @@ rrd_file_t *rrd_open(
             goto out_close;
         }
     }
+#ifdef HAVE_POSIX_FALLOCATE
   no_lseek_necessary:
+#endif
 
 #ifdef HAVE_MMAP
 #ifndef HAVE_POSIX_FALLOCATE