1
0
Fork 0

replace #[repr(packed)] with #[repr(C)]

avoids warnings regarding unsafe behaviour
This commit is contained in:
Astro 2019-05-07 00:05:38 +02:00
parent fdc6c38de6
commit 1e540a1175
2 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ pub trait Register {
#[macro_export] #[macro_export]
macro_rules! register { macro_rules! register {
($mod_name: ident, $struct_name: ident, $inner: ty) => ( ($mod_name: ident, $struct_name: ident, $inner: ty) => (
#[repr(packed)] #[repr(C)]
pub struct $struct_name { pub struct $struct_name {
inner: RW<$inner>, inner: RW<$inner>,
} }

View File

@ -11,7 +11,7 @@ pub enum ParityMode {
ForceTo1 = 0b011, ForceTo1 = 0b011,
} }
#[repr(packed)] #[repr(C)]
pub struct RegisterBlock { pub struct RegisterBlock {
control: Control, control: Control,
mode: Mode, mode: Mode,