The scandir compar argument is supposed to get passed ‘const void *’ pointers. We get a warning otherwise. Signed-off-by: Guillem Jover <guillem@xxxxxxxxxxx> --- disk-utils/mkfs.cramfs.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/disk-utils/mkfs.cramfs.c b/disk-utils/mkfs.cramfs.c index 4741440..7a1601a 100644 --- a/disk-utils/mkfs.cramfs.c +++ b/disk-utils/mkfs.cramfs.c @@ -285,9 +285,10 @@ 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 struct dirent **a, const struct dirent **b) +static int cramsort (const void *a, const void *b) { - return strcmp((*a)->d_name, (*b)->d_name); + return strcmp((*(const struct dirent **)a)->d_name, + (*(const struct dirent **)b)->d_name); } static unsigned int parse_directory(struct entry *root_entry, const char *name, struct entry **prev, loff_t *fslen_ub) -- 1.6.4.3 -- To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html