]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
remove.c: avoid compiler warning
authorEric Blake <ebb9@byu.net>
Sun, 28 Sep 2008 00:14:07 +0000 (18:14 -0600)
committerEric Blake <ebb9@byu.net>
Sun, 28 Sep 2008 00:14:07 +0000 (18:14 -0600)
* src/remove.c (compare_ino, dirent_count)
[!HAVE_STRUCT_DIRENT_D_TYPE]: Mask declaration when unused.

Signed-off-by: Eric Blake <ebb9@byu.net>
src/remove.c

index 26f096e2c3e53136de372e0db9e228598bd30017..ea528434158b9d2732691cf9a29fb94ebd32ff75 100644 (file)
@@ -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