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:
Ben Avison
2022-09-01 17:10:26 +01:00
parent 62d90c8500
commit 01edbb8af6
2 changed files with 2 additions and 2 deletions

View File

@@ -1273,7 +1273,7 @@ static void process_enumeration(tuh_xfer_t* xfer)
break;
}
#endif
__attribute__((fallthrough));
TU_ATTR_FALLTHROUGH;
#endif
case ENUM_SET_ADDR: