|
|
@ -1027,13 +1027,15 @@ let explain_null_test_after_dereference exp node line loc =
|
|
|
|
| None -> Localise.no_desc
|
|
|
|
| None -> Localise.no_desc
|
|
|
|
|
|
|
|
|
|
|
|
let _warning loc fmt fmt_string =
|
|
|
|
let _warning loc fmt fmt_string =
|
|
|
|
F.fprintf fmt "%s:%d: Warning: " (DB.source_file_to_string !DB.current_source) loc.Location.line;
|
|
|
|
if !Config.developer_mode then
|
|
|
|
F.fprintf fmt fmt_string
|
|
|
|
begin
|
|
|
|
|
|
|
|
F.fprintf
|
|
|
|
(** Print a warning to the out stream, at the given location *)
|
|
|
|
fmt "%s:%d: Warning: " (DB.source_file_to_string !DB.current_source) loc.Location.line;
|
|
|
|
let warning_out loc fmt_string =
|
|
|
|
F.fprintf fmt fmt_string
|
|
|
|
_warning loc (Logging.get_out_formatter ()) fmt_string
|
|
|
|
end
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
F.ifprintf fmt fmt_string
|
|
|
|
|
|
|
|
|
|
|
|
(** Print a warning to the err stream, at the given location *)
|
|
|
|
(** Print a warning to the err stream at the given location (note: only prints in developer mode) *)
|
|
|
|
let warning_err loc fmt_string =
|
|
|
|
let warning_err loc fmt_string =
|
|
|
|
_warning loc (Logging.get_err_formatter ()) fmt_string
|
|
|
|
_warning loc (Logging.get_err_formatter ()) fmt_string
|
|
|
|