Parcourir la source

gcc: Really make g++ happy.

* gcc-plugin/src/starpu.c (build_variable_from_file_contents): Use
  `void *' for the return type of `char *', and cast the argument to
  `build_string_variable' to `char *' explicitly, to really placate g++.
Ludovic Courtès il y a 13 ans
Parent
commit
df8b951430
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      gcc-plugin/src/starpu.c

+ 2 - 2
gcc-plugin/src/starpu.c

@@ -1102,7 +1102,7 @@ build_variable_from_file_contents (location_t loc,
 	error_at (loc, "failed to open %qs: %m", file);
       else
 	{
-	  char *contents;
+	  void *contents;
 
 	  contents = mmap (NULL, st.st_size, PROT_READ, MAP_SHARED, fd, 0);
 	  if (contents == NULL)
@@ -1110,7 +1110,7 @@ build_variable_from_file_contents (location_t loc,
 	  else
 	    {
 	      var = build_string_variable (loc, name_seed,
-					   contents, st.st_size);
+					   (char *) contents, st.st_size);
 	      pushdecl (var);
 	      munmap (contents, st.st_size);
 	    }