From 1c077d15ada40e688146259dee799ec3c2c5b28a Mon Sep 17 00:00:00 2001 From: StemCll Date: Sun, 20 Nov 2022 12:03:31 +0100 Subject: [PATCH 1/2] Add clippy::cast_lossless warning Signed-off-by: StemCll lydjotj6f@mozmail.com --- src/api_server/src/lib.rs | 2 +- src/arch/src/aarch64/fdt.rs | 10 +++++----- src/arch/src/aarch64/regs.rs | 4 ++-- src/arch/src/lib.rs | 2 +- src/cpuid/src/bit_helper.rs | 2 +- src/cpuid/src/lib.rs | 2 +- src/cpuid/src/transformer/mod.rs | 2 +- src/devices/src/lib.rs | 2 +- src/devices/src/virtio/balloon/device.rs | 10 +++++----- src/devices/src/virtio/balloon/persist.rs | 4 ++-- src/devices/src/virtio/block/io/async_io.rs | 2 +- src/devices/src/virtio/block/io/mod.rs | 4 ++-- src/devices/src/virtio/mmio.rs | 4 ++-- src/devices/src/virtio/net/test_utils.rs | 4 ++-- src/devices/src/virtio/test_utils.rs | 2 +- src/dumbo/src/lib.rs | 2 +- src/firecracker/src/main.rs | 1 + src/io_uring/src/lib.rs | 4 ++-- src/jailer/src/main.rs | 1 + src/logger/src/lib.rs | 2 +- src/mmds/src/lib.rs | 1 + src/mmds/src/token.rs | 2 +- src/rate_limiter/src/lib.rs | 2 +- src/rebase-snap/src/main.rs | 1 + src/seccompiler/src/lib.rs | 1 + src/snapshot/src/lib.rs | 3 ++- src/utils/src/lib.rs | 1 + src/vmm/src/lib.rs | 2 +- src/vmm/src/vmm_config/vsock.rs | 2 +- src/vmm/src/vstate/vcpu/x86_64.rs | 4 ++-- tools/bindgen.sh | 1 + 31 files changed, 47 insertions(+), 39 deletions(-) diff --git a/src/api_server/src/lib.rs b/src/api_server/src/lib.rs index a01a7a1fca0..cff6e8e435c 100644 --- a/src/api_server/src/lib.rs +++ b/src/api_server/src/lib.rs @@ -4,7 +4,7 @@ #![deny(missing_docs)] #![warn(clippy::ptr_as_ptr)] #![warn(clippy::undocumented_unsafe_blocks)] - +#![warn(clippy::cast_lossless)] //! Implements the interface for intercepting API requests, forwarding them to the VMM //! and responding to the user. //! It is constructed on top of an HTTP Server that uses Unix Domain Sockets and `EPOLL` to diff --git a/src/arch/src/aarch64/fdt.rs b/src/arch/src/aarch64/fdt.rs index 6291f1918c6..e24a69bc653 100644 --- a/src/arch/src/aarch64/fdt.rs +++ b/src/arch/src/aarch64/fdt.rs @@ -146,10 +146,10 @@ fn create_cpu_nodes(fdt: &mut FdtWriter, vcpu_mpidr: &[u64]) -> Result<()> { fdt.property_u32(cache.type_.of_cache_size(), size as u32)?; } if let Some(line_size) = cache.line_size { - fdt.property_u32(cache.type_.of_cache_line_size(), line_size as u32)?; + fdt.property_u32(cache.type_.of_cache_line_size(), u32::from(line_size))?; } if let Some(number_of_sets) = cache.number_of_sets { - fdt.property_u32(cache.type_.of_cache_sets(), number_of_sets as u32)?; + fdt.property_u32(cache.type_.of_cache_sets(), u32::from(number_of_sets))?; } } @@ -188,15 +188,15 @@ fn create_cpu_nodes(fdt: &mut FdtWriter, vcpu_mpidr: &[u64]) -> Result<()> { ))?); fdt.property_u32("phandle", cache_phandle)?; fdt.property_string("compatible", "cache")?; - fdt.property_u32("cache-level", cache.level as u32)?; + fdt.property_u32("cache-level", u32::from(cache.level))?; if let Some(size) = cache.size_ { fdt.property_u32(cache.type_.of_cache_size(), size as u32)?; } if let Some(line_size) = cache.line_size { - fdt.property_u32(cache.type_.of_cache_line_size(), line_size as u32)?; + fdt.property_u32(cache.type_.of_cache_line_size(), u32::from(line_size))?; } if let Some(number_of_sets) = cache.number_of_sets { - fdt.property_u32(cache.type_.of_cache_sets(), number_of_sets as u32)?; + fdt.property_u32(cache.type_.of_cache_sets(), u32::from(number_of_sets))?; } if let Some(cache_type) = cache.type_.of_cache_type() { fdt.property_null(cache_type)?; diff --git a/src/arch/src/aarch64/regs.rs b/src/arch/src/aarch64/regs.rs index f319e3c3c1d..f70c4901ee3 100644 --- a/src/arch/src/aarch64/regs.rs +++ b/src/arch/src/aarch64/regs.rs @@ -239,7 +239,7 @@ pub fn setup_boot_regs( /// /// * `regid` - The index of the register we are checking. pub fn is_system_register(regid: u64) -> bool { - if (regid & KVM_REG_ARM_COPROC_MASK as u64) == KVM_REG_ARM_CORE as u64 { + if (regid & u64::from(KVM_REG_ARM_COPROC_MASK)) == u64::from(KVM_REG_ARM_CORE) { return false; } @@ -508,7 +508,7 @@ mod tests { assert!(!is_system_register(regid)); let regid = KVM_REG_ARM64 as u64 | KVM_REG_SIZE_U64 as u64 - | kvm_bindings::KVM_REG_ARM64_SYSREG as u64; + | u64::from(kvm_bindings::KVM_REG_ARM64_SYSREG); assert!(is_system_register(regid)); } diff --git a/src/arch/src/lib.rs b/src/arch/src/lib.rs index 6ba5c213cf3..8aec4486546 100644 --- a/src/arch/src/lib.rs +++ b/src/arch/src/lib.rs @@ -4,7 +4,7 @@ #![deny(missing_docs)] #![warn(clippy::ptr_as_ptr)] #![warn(clippy::undocumented_unsafe_blocks)] - +#![warn(clippy::cast_lossless)] //! Implements platform specific functionality. //! Supported platforms: x86_64 and aarch64. use std::{fmt, result}; diff --git a/src/cpuid/src/bit_helper.rs b/src/cpuid/src/bit_helper.rs index 0b8b8d43930..36385454329 100644 --- a/src/cpuid/src/bit_helper.rs +++ b/src/cpuid/src/bit_helper.rs @@ -148,7 +148,7 @@ impl BitHelper for u32 { assert!(pos <= MAX_U32_BIT_INDEX, "Invalid pos"); *self &= !(1 << pos); - *self |= (val as u32) << pos; + *self |= (u32::from(val)) << pos; self } diff --git a/src/cpuid/src/lib.rs b/src/cpuid/src/lib.rs index 5909044e38e..8a2a2ed2021 100644 --- a/src/cpuid/src/lib.rs +++ b/src/cpuid/src/lib.rs @@ -8,7 +8,7 @@ #![deny(missing_docs)] #![warn(clippy::ptr_as_ptr)] #![warn(clippy::undocumented_unsafe_blocks)] - +#![warn(clippy::cast_lossless)] //! Utility for configuring the CPUID (CPU identification) for the guest microVM. #![cfg(target_arch = "x86_64")] diff --git a/src/cpuid/src/transformer/mod.rs b/src/cpuid/src/transformer/mod.rs index 66f964f8674..aea30d14719 100644 --- a/src/cpuid/src/transformer/mod.rs +++ b/src/cpuid/src/transformer/mod.rs @@ -36,7 +36,7 @@ impl VmSpec { cpu_vendor_id, cpu_index, cpu_count, - cpu_bits: (cpu_count > 1 && smt) as u8, + cpu_bits: u8::from(cpu_count > 1 && smt), brand_string: BrandString::from_vendor_id(&cpu_vendor_id), }) } diff --git a/src/devices/src/lib.rs b/src/devices/src/lib.rs index 1f1c3ce58c5..c8222c7d941 100644 --- a/src/devices/src/lib.rs +++ b/src/devices/src/lib.rs @@ -7,7 +7,7 @@ #![warn(clippy::ptr_as_ptr)] #![warn(clippy::undocumented_unsafe_blocks)] - +#![warn(clippy::cast_lossless)] //! Emulates virtual and hardware devices. use std::io; diff --git a/src/devices/src/virtio/balloon/device.rs b/src/devices/src/virtio/balloon/device.rs index 2cb827dab13..fe181ed18d6 100644 --- a/src/devices/src/virtio/balloon/device.rs +++ b/src/devices/src/virtio/balloon/device.rs @@ -303,7 +303,7 @@ impl Balloon { // Remove the page ranges. for (page_frame_number, range_len) in page_ranges { let guest_addr = - GuestAddress((page_frame_number as u64) << VIRTIO_BALLOON_PFN_SHIFT); + GuestAddress(u64::from(page_frame_number) << VIRTIO_BALLOON_PFN_SHIFT); if let Err(err) = remove_range( mem, @@ -365,7 +365,7 @@ impl Balloon { // so we ignore the rest of it. let addr = head .addr - .checked_add(index as u64) + .checked_add(u64::from(index)) .ok_or(BalloonError::MalformedDescriptor)?; let stat = mem .read_obj::(addr) @@ -445,8 +445,8 @@ impl Balloon { pub fn update_timer_state(&mut self) { let timer_state = TimerState::Periodic { - current: Duration::from_secs(self.stats_polling_interval_s as u64), - interval: Duration::from_secs(self.stats_polling_interval_s as u64), + current: Duration::from_secs(u64::from(self.stats_polling_interval_s)), + interval: Duration::from_secs(u64::from(self.stats_polling_interval_s)), }; self.stats_timer .set_state(timer_state, SetTimeFlags::Default); @@ -687,7 +687,7 @@ pub(crate) mod tests { let features: u64 = (1u64 << VIRTIO_F_VERSION_1) | ((if *deflate_on_oom { 1 } else { 0 }) << VIRTIO_BALLOON_F_DEFLATE_ON_OOM) - | ((*stats_interval as u64) << VIRTIO_BALLOON_F_STATS_VQ); + | ((u64::from(*stats_interval)) << VIRTIO_BALLOON_F_STATS_VQ); assert_eq!(balloon.avail_features_by_page(0), features as u32); assert_eq!(balloon.avail_features_by_page(1), (features >> 32) as u32); diff --git a/src/devices/src/virtio/balloon/persist.rs b/src/devices/src/virtio/balloon/persist.rs index 8a9d4179bdb..09eee7c9016 100644 --- a/src/devices/src/virtio/balloon/persist.rs +++ b/src/devices/src/virtio/balloon/persist.rs @@ -145,8 +145,8 @@ impl Persist<'_> for Balloon { // Restart timer if needed. let timer_state = TimerState::Periodic { - current: Duration::from_secs(state.stats_polling_interval_s as u64), - interval: Duration::from_secs(state.stats_polling_interval_s as u64), + current: Duration::from_secs(u64::from(state.stats_polling_interval_s)), + interval: Duration::from_secs(u64::from(state.stats_polling_interval_s)), }; balloon .stats_timer diff --git a/src/devices/src/virtio/block/io/async_io.rs b/src/devices/src/virtio/block/io/async_io.rs index e3ea9be3112..656ef166969 100644 --- a/src/devices/src/virtio/block/io/async_io.rs +++ b/src/devices/src/virtio/block/io/async_io.rs @@ -67,7 +67,7 @@ impl AsyncFileEngine { let completion_evt = EventFd::new(libc::EFD_NONBLOCK).map_err(Error::EventFd)?; let ring = IoUring::new( - IO_URING_NUM_ENTRIES as u32, + u32::from(IO_URING_NUM_ENTRIES), vec![&file], vec![ // Make sure we only allow operations on pre-registered fds. diff --git a/src/devices/src/virtio/block/io/mod.rs b/src/devices/src/virtio/block/io/mod.rs index 489026e3058..b1b5e2919dd 100644 --- a/src/devices/src/virtio/block/io/mod.rs +++ b/src/devices/src/virtio/block/io/mod.rs @@ -240,14 +240,14 @@ pub mod tests { fn check_dirty_mem(mem: &GuestMemoryMmap, addr: GuestAddress, len: u32) { let bitmap = mem.find_region(addr).unwrap().bitmap().as_ref().unwrap(); - for offset in addr.0..addr.0 + len as u64 { + for offset in addr.0..addr.0 + u64::from(len) { assert!(bitmap.dirty_at(offset as usize)); } } fn check_clean_mem(mem: &GuestMemoryMmap, addr: GuestAddress, len: u32) { let bitmap = mem.find_region(addr).unwrap().bitmap().as_ref().unwrap(); - for offset in addr.0..addr.0 + len as u64 { + for offset in addr.0..addr.0 + u64::from(len) { assert!(!bitmap.dirty_at(offset as usize)); } } diff --git a/src/devices/src/virtio/mmio.rs b/src/devices/src/virtio/mmio.rs index 4215d21ebb9..f4eef2b7e02 100644 --- a/src/devices/src/virtio/mmio.rs +++ b/src/devices/src/virtio/mmio.rs @@ -235,7 +235,7 @@ impl BusDevice for MmioTransport { features } 0x34 => self.with_queue(0, |q| u32::from(q.get_max_size())), - 0x44 => self.with_queue(0, |q| q.ready as u32), + 0x44 => self.with_queue(0, |q| u32::from(q.ready)), 0x60 => self.interrupt_status.load(Ordering::SeqCst) as u32, 0x70 => self.device_status, 0xfc => self.config_generation, @@ -513,7 +513,7 @@ pub(crate) mod tests { assert_eq!(read_le_u32(&buf[..]), 16); d.read(0x44, &mut buf[..]); - assert_eq!(read_le_u32(&buf[..]), false as u32); + assert_eq!(read_le_u32(&buf[..]), u32::from(false)); d.interrupt_status.store(111, Ordering::SeqCst); d.read(0x60, &mut buf[..]); diff --git a/src/devices/src/virtio/net/test_utils.rs b/src/devices/src/virtio/net/test_utils.rs index c9224fe7aa0..89375e225ed 100644 --- a/src/devices/src/virtio/net/test_utils.rs +++ b/src/devices/src/virtio/net/test_utils.rs @@ -434,10 +434,10 @@ pub mod test { desc.next.set(next_index); } - addr += len as u64; + addr += u64::from(len); // Add small random gaps between descriptor addresses in order to make sure we // don't blindly read contiguous memory. - addr += utils::rand::xor_pseudo_rng_u32() as u64 % 10; + addr += u64::from(utils::rand::xor_pseudo_rng_u32()) % 10; } // Mark the chain as available. diff --git a/src/devices/src/virtio/test_utils.rs b/src/devices/src/virtio/test_utils.rs index 858f2993e77..d5cc58fecf3 100644 --- a/src/devices/src/virtio/test_utils.rs +++ b/src/devices/src/virtio/test_utils.rs @@ -325,7 +325,7 @@ impl<'a> VirtQueue<'a> { pub fn check_used_elem(&self, used_index: u16, expected_id: u16, expected_len: u32) { let used_elem = self.used.ring[used_index as usize].get(); - assert_eq!(used_elem.id, expected_id as u32); + assert_eq!(used_elem.id, u32::from(expected_id)); assert_eq!(used_elem.len, expected_len); } } diff --git a/src/dumbo/src/lib.rs b/src/dumbo/src/lib.rs index e77f7f81244..40899809f11 100644 --- a/src/dumbo/src/lib.rs +++ b/src/dumbo/src/lib.rs @@ -4,7 +4,7 @@ #![deny(missing_docs)] #![warn(clippy::ptr_as_ptr)] #![warn(clippy::undocumented_unsafe_blocks)] - +#![warn(clippy::cast_lossless)] //! Provides helper logic for parsing and writing protocol data units, and minimalist //! implementations of a TCP listener, a TCP connection, and an HTTP/1.1 server. pub mod pdu; diff --git a/src/firecracker/src/main.rs b/src/firecracker/src/main.rs index fdd5522401d..76ba56e070e 100644 --- a/src/firecracker/src/main.rs +++ b/src/firecracker/src/main.rs @@ -3,6 +3,7 @@ #![warn(clippy::ptr_as_ptr)] #![warn(clippy::undocumented_unsafe_blocks)] +#![warn(clippy::cast_lossless)] mod api_server_adapter; mod metrics; diff --git a/src/io_uring/src/lib.rs b/src/io_uring/src/lib.rs index 9106ad93275..4451342f8a3 100644 --- a/src/io_uring/src/lib.rs +++ b/src/io_uring/src/lib.rs @@ -4,7 +4,7 @@ #![deny(missing_docs)] #![warn(clippy::ptr_as_ptr)] #![warn(clippy::undocumented_unsafe_blocks)] - +#![warn(clippy::cast_lossless)] //! High-level interface over Linux io_uring. //! //! Aims to provide an easy-to-use interface, while making some Firecracker-specific simplifying @@ -368,7 +368,7 @@ impl IoUring { let supported_opcodes: HashSet = probes .as_slice() .iter() - .filter(|op| ((op.flags as u32) & bindings::IO_URING_OP_SUPPORTED) != 0) + .filter(|op| ((u32::from(op.flags)) & bindings::IO_URING_OP_SUPPORTED) != 0) .map(|op| op.op) .collect(); diff --git a/src/jailer/src/main.rs b/src/jailer/src/main.rs index 5f111b15a6c..b06ac6a05e7 100644 --- a/src/jailer/src/main.rs +++ b/src/jailer/src/main.rs @@ -3,6 +3,7 @@ #![warn(clippy::ptr_as_ptr)] #![warn(clippy::undocumented_unsafe_blocks)] +#![warn(clippy::cast_lossless)] mod cgroup; mod chroot; diff --git a/src/logger/src/lib.rs b/src/logger/src/lib.rs index dbd7323cfda..80aa2a27c1e 100644 --- a/src/logger/src/lib.rs +++ b/src/logger/src/lib.rs @@ -4,7 +4,7 @@ #![deny(missing_docs)] #![warn(clippy::ptr_as_ptr)] #![warn(clippy::undocumented_unsafe_blocks)] - +#![warn(clippy::cast_lossless)] //! Crate that implements Firecracker specific functionality as far as logging and metrics //! collecting. diff --git a/src/mmds/src/lib.rs b/src/mmds/src/lib.rs index 09276ee4b7b..c21a759a4ac 100644 --- a/src/mmds/src/lib.rs +++ b/src/mmds/src/lib.rs @@ -3,6 +3,7 @@ #![warn(clippy::ptr_as_ptr)] #![warn(clippy::undocumented_unsafe_blocks)] +#![warn(clippy::cast_lossless)] pub mod data_store; pub mod ns; diff --git a/src/mmds/src/token.rs b/src/mmds/src/token.rs index 0c9548dd139..272318ccc85 100644 --- a/src/mmds/src/token.rs +++ b/src/mmds/src/token.rs @@ -277,7 +277,7 @@ impl TokenAuthority { // to current time (also in milliseconds). This addition is safe // because ttl is verified beforehand and can never be more than // 6h (21_600_000 ms). - now_as_milliseconds.add(ttl_as_seconds as u64 * MILLISECONDS_PER_SECOND) + now_as_milliseconds.add(u64::from(ttl_as_seconds) * MILLISECONDS_PER_SECOND) } } diff --git a/src/rate_limiter/src/lib.rs b/src/rate_limiter/src/lib.rs index 37faf392647..c22e52bfdda 100644 --- a/src/rate_limiter/src/lib.rs +++ b/src/rate_limiter/src/lib.rs @@ -4,7 +4,7 @@ #![deny(missing_docs)] #![warn(clippy::ptr_as_ptr)] #![warn(clippy::undocumented_unsafe_blocks)] - +#![warn(clippy::cast_lossless)] //! # Rate Limiter //! //! Provides a rate limiter written in Rust useful for IO operations that need to diff --git a/src/rebase-snap/src/main.rs b/src/rebase-snap/src/main.rs index 10f577d62b7..4a06257440e 100644 --- a/src/rebase-snap/src/main.rs +++ b/src/rebase-snap/src/main.rs @@ -3,6 +3,7 @@ #![warn(clippy::ptr_as_ptr)] #![warn(clippy::undocumented_unsafe_blocks)] +#![warn(clippy::cast_lossless)] use std::fs::{File, OpenOptions}; use std::io::{Seek, SeekFrom}; diff --git a/src/seccompiler/src/lib.rs b/src/seccompiler/src/lib.rs index 3baaed0d468..a7284ed60c9 100644 --- a/src/seccompiler/src/lib.rs +++ b/src/seccompiler/src/lib.rs @@ -3,6 +3,7 @@ #![deny(missing_docs)] #![warn(clippy::ptr_as_ptr)] #![warn(clippy::undocumented_unsafe_blocks)] +#![warn(clippy::cast_lossless)] //! The library crate that defines common helper functions that are generally used in //! conjunction with seccompiler-bin. diff --git a/src/snapshot/src/lib.rs b/src/snapshot/src/lib.rs index 0219fbfc804..53dd7d5c31a 100644 --- a/src/snapshot/src/lib.rs +++ b/src/snapshot/src/lib.rs @@ -3,6 +3,7 @@ #![deny(missing_docs)] #![warn(clippy::ptr_as_ptr)] #![warn(clippy::undocumented_unsafe_blocks)] +#![warn(clippy::cast_lossless)] //! Provides version tolerant serialization and deserialization facilities and //! implements a persistent storage format for Firecracker state snapshots. @@ -95,7 +96,7 @@ fn get_format_version(magic_id: u64) -> Result { } fn build_magic_id(format_version: u16) -> u64 { - BASE_MAGIC_ID | format_version as u64 + BASE_MAGIC_ID | u64::from(format_version) } impl Snapshot { diff --git a/src/utils/src/lib.rs b/src/utils/src/lib.rs index 6e1cc48b0bb..fa6b22d7f69 100644 --- a/src/utils/src/lib.rs +++ b/src/utils/src/lib.rs @@ -3,6 +3,7 @@ #![warn(clippy::ptr_as_ptr)] #![warn(clippy::undocumented_unsafe_blocks)] +#![warn(clippy::cast_lossless)] // We use `utils` as a wrapper over `vmm_sys_util` to control the latter // dependency easier (i.e. update only in one place `vmm_sys_util` version). diff --git a/src/vmm/src/lib.rs b/src/vmm/src/lib.rs index ee1ff771d2d..df099c56009 100644 --- a/src/vmm/src/lib.rs +++ b/src/vmm/src/lib.rs @@ -694,7 +694,7 @@ impl Vmm { ) -> std::result::Result<(), BalloonError> { // The balloon cannot have a target size greater than the size of // the guest memory. - if amount_mib as u64 > mem_size_mib(self.guest_memory()) { + if u64::from(amount_mib) > mem_size_mib(self.guest_memory()) { return Err(BalloonError::TooManyPagesRequested); } diff --git a/src/vmm/src/vmm_config/vsock.rs b/src/vmm/src/vmm_config/vsock.rs index bc320978174..7f99553ac0f 100644 --- a/src/vmm/src/vmm_config/vsock.rs +++ b/src/vmm/src/vmm_config/vsock.rs @@ -159,7 +159,7 @@ pub(crate) mod tests { vsock_config.guest_cid = new_cid; store.insert(vsock_config).unwrap(); let vsock = store.get().unwrap(); - assert_eq!(vsock.lock().unwrap().cid(), new_cid as u64); + assert_eq!(vsock.lock().unwrap().cid(), u64::from(new_cid)); } #[test] diff --git a/src/vmm/src/vstate/vcpu/x86_64.rs b/src/vmm/src/vstate/vcpu/x86_64.rs index 412186bab82..119f8d23e07 100644 --- a/src/vmm/src/vstate/vcpu/x86_64.rs +++ b/src/vmm/src/vstate/vcpu/x86_64.rs @@ -438,8 +438,8 @@ impl KvmVcpu { // We accept values within a tolerance of 250 parts // per million beacuse it is common for TSC frequency // to differ due to calibration at boot time. - let diff = (self.get_tsc_khz()? as i64 - state_tsc_freq as i64).abs(); - Ok(diff > (state_tsc_freq as f64 * TSC_KHZ_TOL).round() as i64) + let diff = (i64::from(self.get_tsc_khz()?) - i64::from(state_tsc_freq)).abs(); + Ok(diff > (f64::from(state_tsc_freq) * TSC_KHZ_TOL).round() as i64) } // Scale the TSC frequency of this vCPU to the one provided as a parameter. diff --git a/tools/bindgen.sh b/tools/bindgen.sh index 28ddc465f36..e3fac076a64 100755 --- a/tools/bindgen.sh +++ b/tools/bindgen.sh @@ -33,6 +33,7 @@ function fc-bindgen { non_snake_case, clippy::ptr_as_ptr, clippy::undocumented_unsafe_blocks + clippy::cast_lossless )] EOF From ed8c79308a4c664bb674506d8e0755a1ce55583e Mon Sep 17 00:00:00 2001 From: StemCll Date: Sun, 20 Nov 2022 12:04:21 +0100 Subject: [PATCH 2/2] Update code coverage for Arm Signed-off-by: StemCll lydjotj6f@mozmail.com --- tests/integration_tests/build/test_coverage.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration_tests/build/test_coverage.py b/tests/integration_tests/build/test_coverage.py index ce158b6b039..a40136cd21b 100644 --- a/tests/integration_tests/build/test_coverage.py +++ b/tests/integration_tests/build/test_coverage.py @@ -23,9 +23,9 @@ # Checkout the cpuid crate. In the future other # differences may appear. if utils.is_io_uring_supported(): - COVERAGE_DICT = {"Intel": 82.99, "AMD": 82.31, "ARM": 82.39} + COVERAGE_DICT = {"Intel": 82.99, "AMD": 82.31, "ARM": 82.47} else: - COVERAGE_DICT = {"Intel": 80.15, "AMD": 79.48, "ARM": 79.60} + COVERAGE_DICT = {"Intel": 80.15, "AMD": 79.48, "ARM": 79.66} PROC_MODEL = proc.proc_type()