diff --git a/src/plugins/variadic/format_typer.ml b/src/plugins/variadic/format_typer.ml index 3a9fc3992f390b99b136003d8e2a044830ef2e9c..656b534c948d55f5ba91a34325fe0abd084bc764 100644 --- a/src/plugins/variadic/format_typer.ml +++ b/src/plugins/variadic/format_typer.ml @@ -65,7 +65,7 @@ let type_f_specifier ?find_typedef spec = | #float_specifier, Some `l -> Cil.doubleType | #float_specifier, Some `L -> Cil.longDoubleType | `c, None -> Cil.intType - | `c, Some `l -> get_typedef ?find_typedef "intmax_t" + | `c, Some `l -> get_typedef ?find_typedef "wchar_t" | `s, None -> Cil.charPtrType | `s, Some `l -> ptr (get_typedef ?find_typedef "wchar_t") | `p, None -> Cil.voidPtrType diff --git a/src/plugins/variadic/standard.ml b/src/plugins/variadic/standard.ml index 98eefe0444d8a2b8313c137f22f55668bff17537..ae07bb0df4ee365492332fda2d4447e169dc0137 100644 --- a/src/plugins/variadic/standard.ml +++ b/src/plugins/variadic/standard.ml @@ -731,13 +731,13 @@ let format_fun_call ~builder env format_fun vf args = let tvparams = try Format_typer.type_format ~find_typedef format - with Format_typer.Type_not_found type_name -> + with Format_typer.Type_not_found (type_name) -> Self.warning ~current:true "Unable to find type %s in the source code which should be used in \ this call:@ no specification will be generated.@ \ Note that due to cleanup, the type may have been defined in the \ - original code but not used anywhere." - type_name; + original code but not used anywhere.@.\ + Did you include <stdint.h> ?" type_name; raise (Translate_call_exn vf.vf_decl) in