Remove warnings

This commit is contained in:
Denis Merigoux 2024-01-26 17:53:49 +01:00
parent a39b67bf12
commit 3e807ae071
No known key found for this signature in database
GPG Key ID: EE99DCFA365C3EE3
2 changed files with 4 additions and 2 deletions

View File

@ -1057,6 +1057,7 @@ let expr_to_dot_label0 :
| Or -> xlang () ~en:"or" ~fr:"ou"
| Xor -> xlang () ~en:"xor" ~fr:"ou bien"
| Map -> xlang () ~en:"on_every" ~fr:"pour_chaque"
| Map2 -> xlang () ~en:"on_every_2" ~fr:"pour_chaque_2"
| Reduce -> xlang () ~en:"reduce" ~fr:"réunion"
| Filter -> xlang () ~en:"filter" ~fr:"filtre"
| Fold -> xlang () ~en:"fold" ~fr:"pliage"

View File

@ -314,7 +314,8 @@ let format_op (fmt : Format.formatter) (op : operator Mark.pos) : unit =
| Filter -> Format.pp_print_string fmt "catala_list_filter"
| Fold -> Format.pp_print_string fmt "catala_list_fold_left"
| HandleDefault -> Format.pp_print_string fmt "catala_handle_default"
| HandleDefaultOpt | FromClosureEnv | ToClosureEnv -> failwith "unimplemented"
| HandleDefaultOpt | FromClosureEnv | ToClosureEnv | Map2 ->
failwith "unimplemented"
let _format_string_list (fmt : Format.formatter) (uids : string list) : unit =
let sanitize_quotes = Re.compile (Re.char '"') in
@ -407,7 +408,7 @@ let rec format_statement
(format_typ ctx (fun fmt -> format_var fmt (Mark.remove v)))
ty
(* Below we detect array initializations which have special treatment. *)
| SLocalInit { name = v; expr = EStruct { fields; name }, _; typ }
| SLocalInit { name = v; expr = EStruct { fields = _; name }, _; typ }
when typ_is_array ctx typ ->
Format.fprintf fmt
"@[<hov 2>%a;@]@\n@[<hov 2>%a.content_field = malloc(sizeof(%a));@]"