mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-24 12:34:31 +00:00
4c64fa7c6f
uring.rs wraps the kernel io_uring interfaces that provide C-style raw pointers, which requires casting a *u8 into other types with stricter alignment requirements. All of these casts are based on the base mmap() pointer (which is always page aligned) or offsets within an mmap provided by the kernel, so we can assume they are safe to cast to the relevant more-aligned types. Fixes clippy warnings of the form: casting from `*mut u8` to a more-strictly-aligned pointer (`*const std::sync::atomic::AtomicU32`) (1 < 4 bytes) BUG=None TEST=bin/clippy Change-Id: Ibef32bb8529d34ece79f089992ad8bd880c5030b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2253068 Reviewed-by: Dylan Reid <dgreid@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Tested-by: Daniel Verkamp <dverkamp@chromium.org> Commit-Queue: Daniel Verkamp <dverkamp@chromium.org> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |