summaryrefslogtreecommitdiff
path: root/disk-utils/mkfs.cramfs.c
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2009-09-29 13:54:58 +0200
committerKarel Zak <kzak@redhat.com>2009-09-29 13:56:37 +0200
commit6f68ab6af00b109e40d74d0d4c34170963210d95 (patch)
treee813b970d32d8e0fc4539f7d019d3bd6ec9f18c0 /disk-utils/mkfs.cramfs.c
parent5da4239746c11f1f048d03dad1d1a193486f71c8 (diff)
downloadutil-linux-old-6f68ab6af00b109e40d74d0d4c34170963210d95.tar.gz
mkfs.cramfs: fix gcc warning (incompatible pointer type)
mkfs.cramfs.c: In function ‘parse_directory’: mkfs.cramfs.c:310: warning: passing argument 4 of ‘scandir’ from incompatible pointer type Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'disk-utils/mkfs.cramfs.c')
-rw-r--r--disk-utils/mkfs.cramfs.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/disk-utils/mkfs.cramfs.c b/disk-utils/mkfs.cramfs.c
index fbb4327e..4ffa9083 100644
--- a/disk-utils/mkfs.cramfs.c
+++ b/disk-utils/mkfs.cramfs.c
@@ -285,10 +285,9 @@ static void eliminate_doubles(struct entry *root, struct entry *orig, loff_t *fs
* We define our own sorting function instead of using alphasort which
* uses strcoll and changes ordering based on locale information.
*/
-static int cramsort (const void *a, const void *b)
+static int cramsort (const struct dirent **a, const struct dirent **b)
{
- return strcmp ((*(const struct dirent **) a)->d_name,
- (*(const struct dirent **) b)->d_name);
+ return strcmp((*a)->d_name, (*b)->d_name);
}
static unsigned int parse_directory(struct entry *root_entry, const char *name, struct entry **prev, loff_t *fslen_ub)