Enable -strict-formats

Summary:public
Rejects malformed format strings.

Reviewed By: jvillard

Differential Revision: D2938247

fb-gh-sync-id: bc731b3
shipit-source-id: bc731b3
master
Josh Berdine 9 years ago committed by facebook-github-bot-5
parent 9bdd1a9d0f
commit 675cfeb56c

@ -78,6 +78,7 @@ OCAMLBUILD_OPTIONS = \
$(OCAMLBUILD_QUIET_OPTIONS) \ $(OCAMLBUILD_QUIET_OPTIONS) \
-classic-display \ -classic-display \
-cflags -principal \ -cflags -principal \
-cflags -strict-formats \
-cflags -w,@5 \ -cflags -w,@5 \
-cflags -w,@8 \ -cflags -w,@8 \
-cflags -w,@10 \ -cflags -w,@10 \

@ -852,7 +852,8 @@ module Stats = struct
| None -> "" in | None -> "" in
let line = let line =
let pp fmt () = let pp fmt () =
if description <> "" then F.fprintf fmt "%s%04s // %s@\n" (indent_string (level + indent_num)) " " description; if description <> ""
then F.fprintf fmt "%s%4s // %s@\n" (indent_string (level + indent_num)) " " description;
F.fprintf fmt "%s%04d: %s" (indent_string (level + indent_num)) loc.Location.line code in F.fprintf fmt "%s%04d: %s" (indent_string (level + indent_num)) loc.Location.line code in
pp_to_string pp () in pp_to_string pp () in
res := line :: "" :: !res in res := line :: "" :: !res in

Loading…
Cancel
Save