Skip to content

Commit 2c52bfd

Browse files
committed
Revert Sarif whitespace changes to unrelated files
1 parent 9a8d370 commit 2c52bfd

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

src/incremental/makefileUtil.ml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ let exec_command ?path (command: string) =
99
let current_dir = Sys.getcwd () in
1010
(match path with
1111
| Some path ->
12-
if Sys.file_exists path && Sys.is_directory path then Sys.chdir path
12+
if Sys.file_exists path && Sys.is_directory path then Sys.chdir path
1313
else failwith ("Directory " ^ path ^ " does not exist!")
1414
| None -> ());
1515
if GobConfig.get_bool "dbg.verbose" then print_endline ("executing command `" ^ command ^ "` in " ^ Sys.getcwd ());
@@ -18,7 +18,7 @@ let exec_command ?path (command: string) =
1818
try
1919
while true do
2020
let line = input_char std_out in
21-
Buffer.add_char output line
21+
Buffer.add_char output line
2222
done;
2323
assert false;
2424
with End_of_file ->
@@ -33,7 +33,7 @@ let string_of_process_status = function
3333
| WSTOPPED n -> "was stopped by signal " ^ string_of_int n
3434

3535
(* BFS for a file with a given suffix in a directory or any subdirectoy *)
36-
let find_file_by_suffix (dir: string) (file_name_suffix: string) =
36+
let find_file_by_suffix (dir: string) (file_name_suffix: string) =
3737
let list_files d = Array.to_list @@ Sys.readdir d in
3838
let dirs = Queue.create () in
3939
let rec search (dir: string) (files: string list) = match files with
@@ -47,25 +47,23 @@ let find_file_by_suffix (dir: string) (file_name_suffix: string) =
4747
in
4848
search dir (list_files dir)
4949

50-
let run_cilly (path: string) =
51-
50+
let run_cilly (path: string) =
5251
if Sys.file_exists path && Sys.is_directory path then (
5352
(* We need to `make clean` if `make` was run manually, otherwise it would say there is nothing to do and cilly would not be run and no combined C file would be created. *)
5453
let _ = exec_command ~path "make clean" in
55-
(try
54+
(try
5655
while true do
5756
let comb = find_file_by_suffix path comb_suffix in
5857
if GobConfig.get_bool "dbg.verbose" then print_endline ("deleting " ^ comb);
5958
Sys.remove comb;
6059
done
6160
with Failure e -> ()); (* Deleted all *_comb.c files in the directory *)
6261
(* Combine source files with make using cilly as compiler *)
63-
let gcc_path = GobConfig.get_string "exp.gcc_path" in
62+
let gcc_path = GobConfig.get_string "exp.gcc_path" in
6463
let (exit_code, output) = exec_command ~path ("make CC=\"cilly --gcc=" ^ gcc_path ^ " --merge --keepmerged\" " ^
6564
"LD=\"cilly --gcc=" ^ gcc_path ^ " --merge --keepmerged\"") in
66-
65+
print_string output;
6766
(* fail if make failed *)
68-
if exit_code <> WEXITED 0 then
67+
if exit_code <> WEXITED 0 then
6968
failwith ("Failed combining files. Make " ^ (string_of_process_status exit_code) ^ ".")
70-
7169
)

src/maingoblint.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ let merge_preprocessed cpp_file_names =
291291
if get_bool "dbg.verbose" then print_endline "Parsing files.";
292292
let files_AST = List.rev_map Cilfacade.getAST cpp_file_names in
293293
remove_temp_dir ();
294+
294295
let cilout =
295296
if get_string "dbg.cilout" = "" then Legacy.stderr else Legacy.open_out (get_string "dbg.cilout")
296297
in

0 commit comments

Comments
 (0)