Browse Source

fixed xcode warning in hl/c

Nicolas Cannasse 7 years ago
parent
commit
7779fece57
1 changed files with 1 additions and 1 deletions
  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