* jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Fri, 17 Jan 2003 14:27:29 +0000 (14:27 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Fri, 17 Jan 2003 14:27:29 +0000 (14:27 +0000)
From-SVN: r61444

gcc/java/ChangeLog
gcc/java/jcf-io.c

index 69cbcb6f6b265b3c1e8fb135d96a3b3857155bf4..67fb51c6d57db0b6e25035a4e50a04d837e2aed2 100644 (file)
@@ -1,3 +1,7 @@
+2003-01-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
+
 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * builtins.c (java_build_function_call_expr): Renamed from
index d2e779337d4b239dd8e294fd231a5e96d0111b7d..6fe472f1e0a5e0782ca34288baba2b28621cfe43 100644 (file)
@@ -368,11 +368,10 @@ caching_stat (char *filename, struct stat *buf)
       /* Unfortunately, scandir is not fully standardized.  In
         particular, the type of the function pointer passed as the
         third argument sometimes takes a "const struct dirent *"
-        parameter, and sometimes just a "struct dirent *".  We rely
-        on the ability to interchange these two types of function
-        pointers.  */
+        parameter, and sometimes just a "struct dirent *".  We cast
+        to (void *) so that either way it is quietly accepted.  */
       dent->num_files = scandir (filename, &dent->files, 
-                                java_or_class_file, 
+                                (void *) java_or_class_file, 
                                 alphasort);
       *slot = dent;
     }