Skip to content
Snippets Groups Projects
Commit e14af00f authored by BRUN Lelio's avatar BRUN Lelio
Browse files

fix warning formatting

parent efe183bc
No related branches found
No related tags found
No related merge requests found
...@@ -71,7 +71,7 @@ let pp fmt = function ...@@ -71,7 +71,7 @@ let pp fmt = function
fprintf fmt "Load error: %s.@." l fprintf fmt "Load error: %s.@." l
let pp_warning loc pp_msg = let pp_warning loc pp_msg =
Format.eprintf "@?%aWarning: %t@." Location.pp loc pp_msg Format.eprintf "@,@[<v>%a@,Warning: %t@]@," Location.pp loc pp_msg
let pp_error loc pp_msg = let pp_error loc pp_msg =
Format.eprintf "@?%aError: @[<v 0>%t@]@." Location.pp loc pp_msg Format.eprintf "@?%aError: @[<v 0>%t@]@." Location.pp loc pp_msg
...@@ -391,12 +391,11 @@ let pp_warning_unused fmt node_schs = ...@@ -391,12 +391,11 @@ let pp_warning_unused fmt node_schs =
(fun u -> (fun u ->
let vu = get_node_var u nd in let vu = get_node_var u nd in
if vu.var_orig then if vu.var_orig then
Format.fprintf Error.pp_warning vu.var_loc
fmt (fun fmt ->
" %a Warning: variable '%s' seems unused@," Format.fprintf
Location.pp fmt
vu.var_loc "variable '%s' seems unused" u))
u)
unused) unused)
node_schs node_schs
......
...@@ -45,7 +45,9 @@ let shift_pos pos1 pos2 = ...@@ -45,7 +45,9 @@ let shift_pos pos1 pos2 =
} }
let line_of (s, _e) = s.pos_lnum let line_of (s, _e) = s.pos_lnum
let pp fmt loc = Format.fprintf fmt "%s" (Lex.range loc) let pp fmt loc =
let s = Lex.range loc in
Format.fprintf fmt "%s" String.(sub s 0 (length s - 1))
let pp_c fmt (s, _e) = let pp_c fmt (s, _e) =
let filename = s.pos_fname in let filename = s.pos_fname in
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment