From: Ruediger Meier Date: Mon, 25 Jun 2018 13:08:55 +0000 (+0200) Subject: wipefs: add missing ifdef X-Git-Tag: v2.33-rc1~148^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3097f788f99804957a8ffb3797ed49cb599daeb7;p=thirdparty%2Futil-linux.git wipefs: add missing ifdef Seen on OSX: misc-utils/wipefs.c:822:5: warning: implicit declaration of function 'rereadpt' is invalid in C99 [-Wimplicit-function-declaration] rereadpt(fd, devname); Signed-off-by: Ruediger Meier --- diff --git a/misc-utils/wipefs.c b/misc-utils/wipefs.c index 49c5c8ca11..13a720e85f 100644 --- a/misc-utils/wipefs.c +++ b/misc-utils/wipefs.c @@ -802,7 +802,6 @@ main(int argc, char **argv) /* * Erase */ - size_t i; ctl.ndevs = argc - optind; while (optind < argc) { @@ -811,10 +810,11 @@ main(int argc, char **argv) ctl.ndevs--; } +#ifdef BLKRRPART /* Re-read partition tables on whole-disk devices. This is * postponed until all is done to avoid conflicts. */ - for (i = 0; i < ctl.nrereads; i++) { + for (size_t i = 0; i < ctl.nrereads; i++) { char *devname = ctl.reread[i]; int fd = open(devname, O_RDONLY); @@ -824,6 +824,7 @@ main(int argc, char **argv) } } free(ctl.reread); +#endif } return EXIT_SUCCESS; }