From: Eric Blake Date: Sun, 28 Sep 2008 00:14:07 +0000 (-0600) Subject: remove.c: avoid compiler warning X-Git-Tag: v7.0~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=58aaf71f0756eada2180553bcbf3686a0c3249bd;p=thirdparty%2Fcoreutils.git remove.c: avoid compiler warning * src/remove.c (compare_ino, dirent_count) [!HAVE_STRUCT_DIRENT_D_TYPE]: Mask declaration when unused. Signed-off-by: Eric Blake --- diff --git a/src/remove.c b/src/remove.c index 26f096e2c3..ea52843415 100644 --- a/src/remove.c +++ b/src/remove.c @@ -1257,6 +1257,7 @@ struct readdir_data char name[FLEXIBLE_ARRAY_MEMBER]; }; +#if HAVE_STRUCT_DIRENT_D_TYPE /* A comparison function to sort on increasing inode number. */ static int compare_ino (void const *av, void const *bv) @@ -1274,6 +1275,7 @@ dirent_count (struct stat const *st) { return st->st_size / 16; } +#endif /* HAVE_STRUCT_DIRENT_D_TYPE */ /* When a directory contains very many entries, operating on N entries in readdir order can be very seek-intensive (be it to unlink or even to