diff --git a/src/header/float/mod.rs b/src/header/float/mod.rs index 4c989e7961..52c36df8d8 100644 --- a/src/header/float/mod.rs +++ b/src/header/float/mod.rs @@ -2,6 +2,9 @@ //! //! See . +// TODO: set this for entire crate when possible +#![deny(unsafe_op_in_unsafe_fn)] + use crate::{ header::_fenv::{FE_TONEAREST, fegetround}, platform::types::c_int, @@ -13,7 +16,7 @@ pub const FLT_RADIX: c_int = 2; /// See . #[unsafe(no_mangle)] pub unsafe extern "C" fn flt_rounds() -> c_int { - match fegetround() { + match unsafe { fegetround() } { FE_TONEAREST => 1, _ => -1, }