qemu-rust.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rust: vmstate: use "cast()" instead of "as"
@ 2025-09-19  8:36 Paolo Bonzini
  2025-09-19 10:41 ` Manos Pitsidianakis
  2025-09-23 14:43 ` Zhao Liu
  0 siblings, 2 replies; 3+ messages in thread
From: Paolo Bonzini @ 2025-09-19  8:36 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-rust

Reported by clippy, fix it.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 rust/migration/src/vmstate.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/migration/src/vmstate.rs b/rust/migration/src/vmstate.rs
index c05c4a1fd66..e04b19b3c9f 100644
--- a/rust/migration/src/vmstate.rs
+++ b/rust/migration/src/vmstate.rs
@@ -144,7 +144,7 @@ macro_rules! vmstate_of {
         $crate::bindings::VMStateField {
             name: ::core::concat!(::core::stringify!($field_name), "\0")
                 .as_bytes()
-                .as_ptr() as *const ::std::os::raw::c_char,
+                .as_ptr().cast::<::std::os::raw::c_char>(),
             offset: ::std::mem::offset_of!($struct_name, $field_name),
             $(num_offset: ::std::mem::offset_of!($struct_name, $num),)?
             $(field_exists: $crate::vmstate_exist_fn!($struct_name, $test_fn),)?
-- 
2.51.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-09-23 14:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-19  8:36 [PATCH] rust: vmstate: use "cast()" instead of "as" Paolo Bonzini
2025-09-19 10:41 ` Manos Pitsidianakis
2025-09-23 14:43 ` Zhao Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).