diff --git a/libraries/AP_Param/tools/eedump.c b/libraries/AP_Param/tools/eedump.c index 1860d7d1ac..2ae98b647b 100644 --- a/libraries/AP_Param/tools/eedump.c +++ b/libraries/AP_Param/tools/eedump.c @@ -7,9 +7,7 @@ uint8_t eeprom[0x1000]; -#pragma pack(1) - -struct EEPROM_header { +struct PACKED EEPROM_header { uint16_t magic; uint8_t revision; uint8_t spare; @@ -18,7 +16,7 @@ struct EEPROM_header { static const uint16_t k_EEPROM_magic = 0x5041; static const uint16_t k_EEPROM_revision = 2; -struct Var_header { +struct PACKED Var_header { uint8_t size : 6; uint8_t spare : 2; uint8_t key; diff --git a/libraries/AP_Param/tools/eedump_apparam.c b/libraries/AP_Param/tools/eedump_apparam.c index 063f615ed2..b54e72e9fc 100644 --- a/libraries/AP_Param/tools/eedump_apparam.c +++ b/libraries/AP_Param/tools/eedump_apparam.c @@ -8,9 +8,7 @@ uint8_t eeprom[0x1000]; -#pragma pack(1) - -struct EEPROM_header { +struct PACKED EEPROM_header { uint8_t magic[2]; uint8_t revision; uint8_t spare;