]> granicus.if.org Git - php/commitdiff
fix incompatible pointer warning
authorAnatol Belski <ab@php.net>
Tue, 3 Feb 2015 15:09:48 +0000 (16:09 +0100)
committerAnatol Belski <ab@php.net>
Tue, 3 Feb 2015 16:52:18 +0000 (17:52 +0100)
php_alphasort() isn't directly compatible with qsort() cb def

main/php_scandir.c

index 9f6517dbf3a46cdf0547632ca42f2de496a90420..67bb25696c33680a421d8f4b217055c83d91683c 100644 (file)
@@ -112,7 +112,7 @@ PHPAPI int php_scandir(const char *dirname, struct dirent **namelist[], int (*se
        *namelist = vector;
 
        if (compare) {
-               qsort (*namelist, nfiles, sizeof(struct dirent *), compare);
+               qsort (*namelist, nfiles, sizeof(struct dirent *), (int (*) (const void *, const void *)) compare);
        }
 
        return nfiles;