Procházet zdrojové kódy

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 před 13 roky
rodič
revize
df8b951430
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  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);
 	    }