Skip to content

Commit 051254f

Browse files
committed
Remove unnecessary cast_to suppress_ovwarn argument in SOverflow
There's no need for the argument: the caller can just ignore the return value.
1 parent 71f3f7a commit 051254f

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

src/cdomain/value/cdomains/int/bitfieldDomain.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ module BitfieldFunctor (Ints_t : IntOps.IntOps): Bitfield_SOverflow with type in
263263
else
264264
top_of ik
265265

266-
let cast_to ?(suppress_ovwarn=false) ?torg ?(no_ov=false) ik (z,o) =
266+
let cast_to ?torg ?(no_ov=false) ik (z,o) =
267267
let (min_ik, max_ik) = Size.range ik in
268268
let (underflow, overflow) = match torg with
269269
| None -> (false, false) (* ik does not change *)

src/cdomain/value/cdomains/int/intervalDomain.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ struct
127127
let maximal = function None -> None | Some (x,y) -> Some y
128128
let minimal = function None -> None | Some (x,y) -> Some x
129129

130-
let cast_to ?(suppress_ovwarn=false) ?torg ?no_ov t = norm ~cast:true t (* norm does all overflow handling *)
130+
let cast_to ?torg ?no_ov t = norm ~cast:true t (* norm does all overflow handling *)
131131

132132
let widen ik x y =
133133
match x, y with

src/cdomain/value/cdomains/int/intervalSetDomain.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ struct
383383
in
384384
binop x y interval_rem
385385

386-
let cast_to ?(suppress_ovwarn=false) ?torg ?no_ov ik x = norm_intvs ~cast:true ik x
386+
let cast_to ?torg ?no_ov ik x = norm_intvs ~cast:true ik x
387387

388388
(*
389389
narrows down the extremeties of xs if they are equal to boundary values of the ikind with (possibly) narrower values from ys

src/cdomain/value/cdomains/intDomain0.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ module SOverflowUnlifter (D : SOverflow) : S with type int_t = D.int_t and type
478478

479479
let neg ?no_ov ik x = fst @@ D.neg ?no_ov ik x
480480

481-
let cast_to ?suppress_ovwarn ?torg ?no_ov ik x = fst @@ D.cast_to ?suppress_ovwarn ?torg ?no_ov ik x
481+
let cast_to ?suppress_ovwarn ?torg ?no_ov ik x = fst @@ D.cast_to ?torg ?no_ov ik x
482482

483483
let of_int ik x = fst @@ D.of_int ik x
484484

@@ -730,7 +730,7 @@ module SOverflowLifter (D : S) : SOverflow with type int_t = D.int_t and type t
730730

731731
let neg ?no_ov ik x = lift @@ D.neg ?no_ov ik x
732732

733-
let cast_to ?suppress_ovwarn ?torg ?no_ov ik x = lift @@ D.cast_to ?suppress_ovwarn ?torg ?no_ov ik x
733+
let cast_to ?torg ?no_ov ik x = lift @@ D.cast_to ?torg ?no_ov ik x
734734

735735
let of_int ik x = lift @@ D.of_int ik x
736736

src/cdomain/value/cdomains/intDomain_intf.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ sig
290290

291291
val neg : ?no_ov:bool -> Cil.ikind -> t -> t * overflow_info
292292

293-
val cast_to : ?suppress_ovwarn:bool -> ?torg:Cil.typ -> ?no_ov:bool -> Cil.ikind -> t -> t * overflow_info
293+
val cast_to : ?torg:Cil.typ -> ?no_ov:bool -> Cil.ikind -> t -> t * overflow_info
294294

295295
val of_int : Cil.ikind -> int_t -> t * overflow_info
296296

0 commit comments

Comments
 (0)