mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-17 05:32:55 +08:00
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.
This commit is contained in:
parent
62d90c8500
commit
01edbb8af6
@ -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
|
||||
|
@ -1273,7 +1273,7 @@ static void process_enumeration(tuh_xfer_t* xfer)
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
__attribute__((fallthrough));
|
||||
TU_ATTR_FALLTHROUGH;
|
||||
#endif
|
||||
|
||||
case ENUM_SET_ADDR:
|
||||
|
Loading…
x
Reference in New Issue
Block a user