Community
Participate
Working Groups
Build Identifier: Version: Indigo Service Release 2 Build id: 20120216-1857 When I get the "no break after case" warning, I can't clear it with a comment. I first tried having CODAN fix the problem by inserting a comment (it chose "/* no break */"), but that didn't make the problem go away. It put the comment in the correct place, but then didn't detect it. I then tried changing the CODAN settings to use "fall through" as the comment, since that's what I've been using in my code base. Still throws the warning. Doesn't always happen though. I tried to create a small example and the comment worked there. The steps to reproduce contains a short excerpt of where it throws the error. Reproducible: Sometimes Steps to Reproduce: case ZCL_TYPE_LOGICAL_BOOLEAN: if (*rec->buffer & 0xFE) { #ifdef ZIGBEE_ZCL_VERBOSE printf( "%s: value 0x%02x is invalid for LOGICAL_BOOLEAN\n", __FUNCTION__, *rec->buffer); #endif newstatus = ZCL_STATUS_INVALID_VALUE; assign = FALSE; } /* fall through */ default: // covers most types
I have noticed the following about the suppression comment: - There must be a line of text that contains nothing but a comment. - This comment must contain the suppression text. It may contain additional text as well. - This line must be the last non-whitespace line, including other comments, before the next case. Perhaps we could relax these requirements a bit.