Explorar el Código

fixed xcode warning in hl/c

Nicolas Cannasse hace 7 años
padre
commit
7779fece57
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/generators/hl2c.ml

+ 1 - 1
src/generators/hl2c.ml

@@ -134,7 +134,7 @@ let ctype t =
 	if nptr = 0 then t else t ^ String.make nptr '*'
 
 let cast_fun s args t =
-	sprintf "((%s (*)(%s))%s)" (ctype t) (String.concat "," (List.map ctype args)) s
+	sprintf "((%s (*)(%s))%s)" (ctype t) (if args = [] then "void" else String.concat "," (List.map ctype args)) s
 
 let dyn_value_field t =
 	"->v." ^ match t with