Skip to content

Commit 6abf675

Browse files
committed
Trim trailing whitespace (PR #1838)
1 parent 50f3cfa commit 6abf675

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/analyses/base.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ struct
207207
| `Top ->
208208
M.warn ~category:M.Category.Integer.div_by_zero ~tags:[CWE 369] "Second argument of division might be zero";
209209
Checks.warn Checks.Category.DivisionByZero "Second argument of division might be zero"
210-
| `Neq ->
210+
| `Neq ->
211211
Checks.safe Checks.Category.DivisionByZero);
212212
ID.div x y
213213
| Mod ->
@@ -219,7 +219,7 @@ struct
219219
| `Top ->
220220
M.warn ~category:M.Category.Integer.div_by_zero ~tags:[CWE 369] "Second argument of modulo might be zero";
221221
Checks.warn Checks.Category.DivisionByZero "Second argument of modulo might be zero"
222-
| `Neq ->
222+
| `Neq ->
223223
Checks.safe Checks.Category.DivisionByZero);
224224
ID.rem x y
225225
| Lt -> ID.lt
@@ -2278,7 +2278,7 @@ struct
22782278
) else if has_non_heap_var a then (
22792279
AnalysisStateUtil.set_mem_safety_flag InvalidFree;
22802280
M.warn ~category:(Behavior (Undefined InvalidMemoryDeallocation)) ~tags:[CWE 590] "Free of non-dynamically allocated memory in function %s for pointer %a" special_fn.vname d_exp ptr;
2281-
Checks.warn Checks.Category.InvalidMemoryAccess "Free of non-dynamically allocated memory in function %s for pointer %a" special_fn.vname d_exp ptr
2281+
Checks.warn Checks.Category.InvalidMemoryAccess "Free of non-dynamically allocated memory in function %s for pointer %a" special_fn.vname d_exp ptr
22822282
) else if has_non_zero_offset a then (
22832283
AnalysisStateUtil.set_mem_safety_flag InvalidFree;
22842284
M.warn ~category:(Behavior (Undefined InvalidMemoryDeallocation)) ~tags:[CWE 761] "Free of memory not at start of buffer in function %s for pointer %a" special_fn.vname d_exp ptr;

src/analyses/memOutOfBounds.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ struct
305305
(set_mem_safety_flag InvalidDeref;
306306
M.warn ~category:(Behavior behavior) ~tags:[CWE cwe_number] "Size of lval dereference expression is %a (in bytes). It is offset by %a (in bytes). Memory out-of-bounds access must occur" ID.pretty casted_es ID.pretty casted_offs);
307307
Checks.warn Checks.Category.InvalidMemoryAccess "Size of lval dereference expression is %a (in bytes). It is offset by %a (in bytes). Memory out-of-bounds access must occur" ID.pretty casted_es ID.pretty casted_offs
308-
| Some false ->
308+
| Some false ->
309309
Checks.safe Checks.Category.InvalidMemoryAccess
310310
| None ->
311311
(set_mem_safety_flag InvalidDeref;
@@ -484,7 +484,7 @@ struct
484484
set_mem_safety_flag InvalidDeref;
485485
M.warn ~category:(Behavior behavior) ~tags:[CWE cwe_number] "Size of %a in function %s is %a (in bytes) with an address offset of %a (in bytes). Count is %a (in bytes). Memory out-of-bounds access must occur" d_exp ptr fun_name ID.pretty casted_ds ID.pretty casted_ao ID.pretty casted_en;
486486
Checks.warn Checks.Category.InvalidMemoryAccess "Size of %a in function %s is %a (in bytes) with an address offset of %a (in bytes). Count is %a (in bytes). Memory out-of-bounds access must occur" d_exp ptr fun_name ID.pretty casted_ds ID.pretty casted_ao ID.pretty casted_en
487-
| Some false ->
487+
| Some false ->
488488
Checks.safe Checks.Category.InvalidMemoryAccess
489489
| None ->
490490
set_mem_safety_flag InvalidDeref;

src/cdomain/value/cdomains/arrayDomain.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1164,7 +1164,7 @@ struct
11641164
else (
11651165
Checks.safe Checks.Category.NegativeArraySize;
11661166
min_i, None)
1167-
| None, None ->
1167+
| None, None ->
11681168
Checks.safe Checks.Category.NegativeArraySize;
11691169
Z.zero, None
11701170
in
@@ -1265,7 +1265,7 @@ struct
12651265
warn_past_end "Array size is smaller than n bytes; can cause a buffer overflow"
12661266
else if n >. min_size then
12671267
warn_past_end "Array size might be smaller than n bytes; can cause a buffer overflow"
1268-
else
1268+
else
12691269
Checks.safe Checks.Category.InvalidMemoryAccess
12701270
| Some min_size, None ->
12711271
if n >. min_size then

0 commit comments

Comments
 (0)