summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorBen Avison <[email protected]>2022-09-01 17:10:26 +0100
committerBen Avison <[email protected]>2022-09-13 18:00:51 +0100
commit01edbb8af6b22fa213bcbbaccd92c9be5f72b376 (patch)
tree4d3f74901ee62a36dc3cc3ae55e8ca811ba890a9 /src/common
parent62d90c850096277080e4044dd37ef9c18748f06c (diff)
IAR doesn't support __attribute__((fallthrough))
IAR generates warning Pa167 'the "fallthrough" attribute is not supported'. It doesn't generate warnings when one switch case falls through to another, so simply make TU_ATTR_FALLTHROUGH expand to an empty string. Also replace one instance of __attribute__ with the macro.
Diffstat (limited to 'src/common')
-rw-r--r--src/common/tusb_compiler.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/tusb_compiler.h b/src/common/tusb_compiler.h
index 2c30daf6f..894d0178a 100644
--- a/src/common/tusb_compiler.h
+++ b/src/common/tusb_compiler.h
@@ -189,7 +189,7 @@
#define TU_ATTR_DEPRECATED(mess) __attribute__ ((deprecated(mess))) // warn if function with this attribute is used
#define TU_ATTR_UNUSED __attribute__ ((unused)) // Function/Variable is meant to be possibly unused
#define TU_ATTR_USED __attribute__ ((used)) // Function/Variable is meant to be used
- #define TU_ATTR_FALLTHROUGH __attribute__((fallthrough))
+ #define TU_ATTR_FALLTHROUGH
#define TU_ATTR_PACKED_BEGIN
#define TU_ATTR_PACKED_END