]> granicus.if.org Git - php/commitdiff
add cast for qsort compare function.
authorWez Furlong <wez@php.net>
Sun, 7 Mar 2004 22:06:36 +0000 (22:06 +0000)
committerWez Furlong <wez@php.net>
Sun, 7 Mar 2004 22:06:36 +0000 (22:06 +0000)
Kinda ugly, but helps assert that we are doing the right thing as well as
kill the warning there.

main/streams/streams.c

index 29049a4bde0cd24ab977931773296db3bc1462a0..af5caa93a781367d6351e51ce49c89a1f82903e1 100755 (executable)
@@ -1891,7 +1891,7 @@ PHPAPI int _php_stream_scandir(char *dirname, php_stream_dirent **namelist[], in
        *namelist = vector;
 
        if (compare) {
-               qsort(*namelist, nfiles, sizeof(php_stream_dirent *), compare);
+               qsort(*namelist, nfiles, sizeof(php_stream_dirent *), (int(*)(const void *, const void *))compare);
        }
        return nfiles;
 }