mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
![]() This is produced by recent versions of bindgen: warning: use of `offset` with a `usize` casted to an `isize` --> /builds/bonzini/qemu/rust/target/debug/build/qemu_api-35cb647f4db404b8/out/bindings.inc.rs:39:21 | 39 | let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(core::ptr::addr_of!((*this).storage) as *const u8).add(byte_index)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast = note: `#[warn(clippy::ptr_offset_with_cast)]` on by default warning: use of `offset` with a `usize` casted to an `isize` --> /builds/bonzini/qemu/rust/target/debug/build/qemu_api-35cb647f4db404b8/out/bindings.inc.rs:68:13 | 68 | (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(core::ptr::addr_of_mut!((*this).storage) as *mut u8).add(byte_index)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast This seems to be new in bindgen 0.71.0, possibly related to bindgen commit 33006185b7878 ("Add raw_ref_macros feature", 2024-11-22). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> |
||
---|---|---|
.. | ||
hw | ||
qemu-api | ||
qemu-api-macros | ||
.gitignore | ||
Cargo.lock | ||
Cargo.toml | ||
clippy.toml | ||
Kconfig | ||
meson.build | ||
rustfmt.toml | ||
wrapper.h |