File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ pub(crate) mod raw {
5252 impl Default for NotifierState :: ver {
5353 fn default ( ) -> Self {
5454 #[ allow( unused_mut) ]
55+ // SAFETY: All bit patterns are valid for this type.
5556 let mut s: Self = unsafe { core:: mem:: zeroed ( ) } ;
5657 #[ ver( V >= V13_0B4 ) ]
5758 s. unk_buf = Array :: new ( [ 0xff ; 0x8 ] ) ;
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ pub(crate) struct FwStamp(pub(crate) AtomicU32);
5353#[ repr( C , packed( 1 ) ) ]
5454pub ( crate ) struct U64 ( pub ( crate ) u64 ) ;
5555
56+ // SAFETY: U64 is zeroable just like u64
5657unsafe impl Zeroable for U64 { }
5758
5859impl fmt:: Debug for U64 {
@@ -70,6 +71,7 @@ impl fmt::Debug for U64 {
7071#[ repr( C , packed( 1 ) ) ]
7172pub ( crate ) struct U32 ( pub ( crate ) u32 ) ;
7273
74+ // SAFETY: U32 is zeroable just like u32
7375unsafe impl Zeroable for U32 { }
7476
7577impl fmt:: Debug for U32 {
You can’t perform that action at this time.
0 commit comments