From 62b9a580e8765ba5f0e8376afe54dab1d245b7d9 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 9 May 2013 20:03:59 +1000 Subject: [PATCH] AP_Common: make PACKED depend on architecture this will remove lots of warnings when building with arduino --- libraries/AP_Common/AP_Common.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/AP_Common/AP_Common.h b/libraries/AP_Common/AP_Common.h index 6ee3d8173e..d161bfabed 100644 --- a/libraries/AP_Common/AP_Common.h +++ b/libraries/AP_Common/AP_Common.h @@ -25,7 +25,11 @@ #pragma GCC diagnostic ignored "-Wredundant-decls" // used to pack structures +#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) +#define PACKED +#else #define PACKED __attribute__((__packed__)) +#endif // Make some dire warnings into errors //