Actions
Bug #9363
closedsavecore: this statement may fall through
Start date:
2018-03-27
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
Description
issue found by gcc 7 build:
../../../common/bzip2/decompress.c:198:10: error: this statement may fall through [-Werror=implicit-fallthrough=] if (uc != BZ_HDR_B) RETURN(BZ_DATA_ERROR_MAGIC); ^ ../../../common/bzip2/decompress.c:44:4: note: here case lll: s->state = lll; \ ^ ../../../common/bzip2/decompress.c:68:4: note: in expansion of macro 'GET_BITS' GET_BITS(lll,uuu,8) ^~~~~~~~ ../../../common/bzip2/decompress.c:200:7: note: in expansion of macro 'GET_UCHAR' GET_UCHAR(BZ_X_MAGIC_2, uc); ^~~~~~~~~ ../../../common/bzip2/decompress.c:201:10: error: this statement may fall through [-Werror=implicit-fallthrough=] if (uc != BZ_HDR_Z) RETURN(BZ_DATA_ERROR_MAGIC); ^ ../../../common/bzip2/decompress.c:44:4: note: here case lll: s->state = lll; \ ^ ../../../common/bzip2/decompress.c:68:4: note: in expansion of macro 'GET_BITS' GET_BITS(lll,uuu,8) ^~~~~~~~ ../../../common/bzip2/decompress.c:203:7: note: in expansion of macro 'GET_UCHAR' GET_UCHAR(BZ_X_MAGIC_3, uc) ^~~~~~~~~ ../../../common/bzip2/decompress.c:204:10: error: this statement may fall through [-Werror=implicit-fallthrough=] if (uc != BZ_HDR_h) RETURN(BZ_DATA_ERROR_MAGIC); ^ ../../../common/bzip2/decompress.c:44:4: note: here case lll: s->state = lll; \ ^ ../../../common/bzip2/decompress.c:206:7: note: in expansion of macro 'GET_BITS' GET_BITS(BZ_X_MAGIC_4, s->blockSize100k, 8) ^~~~~~~~ ../../../common/bzip2/decompress.c:211:10: error: this statement may fall through [-Werror=implicit-fallthrough=] if (s->smallDecompress) { ^ ../../../common/bzip2/decompress.c:44:4: note: here case lll: s->state = lll; \ ^ ../../../common/bzip2/decompress.c:68:4: note: in expansion of macro 'GET_BITS' GET_BITS(lll,uuu,8) ^~~~~~~~ ../../../common/bzip2/decompress.c:222:7: note: in expansion of macro 'GET_UCHAR' GET_UCHAR(BZ_X_BLKHDR_1, uc); ^~~~~~~~~ ../../../common/bzip2/decompress.c:225:10: error: this statement may fall through [-Werror=implicit-fallthrough=] if (uc != 0x31) RETURN(BZ_DATA_ERROR); ^ ../../../common/bzip2/decompress.c:44:4: note: here case lll: s->state = lll; \ ^ ../../../common/bzip2/decompress.c:68:4: note: in expansion of macro 'GET_BITS' GET_BITS(lll,uuu,8) ^~~~~~~~ ../../../common/bzip2/decompress.c:226:7: note: in expansion of macro 'GET_UCHAR' GET_UCHAR(BZ_X_BLKHDR_2, uc); ^~~~~~~~~ ../../../common/bzip2/decompress.c:227:10: error: this statement may fall through [-Werror=implicit-fallthrough=] if (uc != 0x41) RETURN(BZ_DATA_ERROR); ^ ../../../common/bzip2/decompress.c:44:4: note: here case lll: s->state = lll; \ ^ ../../../common/bzip2/decompress.c:68:4: note: in expansion of macro 'GET_BITS' GET_BITS(lll,uuu,8) ^~~~~~~~ ../../../common/bzip2/decompress.c:228:7: note: in expansion of macro 'GET_UCHAR' GET_UCHAR(BZ_X_BLKHDR_3, uc); ^~~~~~~~~ ../../../common/bzip2/decompress.c:229:10: error: this statement may fall through [-Werror=implicit-fallthrough=] if (uc != 0x59) RETURN(BZ_DATA_ERROR); ^ ../../../common/bzip2/decompress.c:44:4: note: here case lll: s->state = lll; \ ^ ../../../common/bzip2/decompress.c:68:4: note: in expansion of macro 'GET_BITS' GET_BITS(lll,uuu,8) ^~~~~~~~ ../../../common/bzip2/decompress.c:230:7: note: in expansion of macro 'GET_UCHAR' GET_UCHAR(BZ_X_BLKHDR_4, uc); ^~~~~~~~~ ../../../common/bzip2/decompress.c:231:10: error: this statement may fall through [-Werror=implicit-fallthrough=] if (uc != 0x26) RETURN(BZ_DATA_ERROR); ^ ../../../common/bzip2/decompress.c:44:4: note: here case lll: s->state = lll; \ ^ ../../../common/bzip2/decompress.c:68:4: note: in expansion of macro 'GET_BITS' GET_BITS(lll,uuu,8) ^~~~~~~~ ../../../common/bzip2/decompress.c:232:7: note: in expansion of macro 'GET_UCHAR' GET_UCHAR(BZ_X_BLKHDR_5, uc); ^~~~~~~~~ ../../../common/bzip2/decompress.c:233:10: error: this statement may fall through [-Werror=implicit-fallthrough=] if (uc != 0x53) RETURN(BZ_DATA_ERROR); ^ ../../../common/bzip2/decompress.c:44:4: note: here case lll: s->state = lll; \ ^ ../../../common/bzip2/decompress.c:68:4: note: in expansion of macro 'GET_BITS' GET_BITS(lll,uuu,8) ^~~~~~~~ ../../../common/bzip2/decompress.c:234:7: note: in expansion of macro 'GET_UCHAR' GET_UCHAR(BZ_X_BLKHDR_6, uc); ^~~~~~~~~ ../../../common/bzip2/decompress.c:241:25: error: this statement may fall through [-Werror=implicit-fallthrough=] s->storedBlockCRC = 0; ~~~~~~~~~~~~~~~~~~^~~ ../../../common/bzip2/decompress.c:44:4: note: here case lll: s->state = lll; \ ^ ../../../common/bzip2/decompress.c:68:4: note: in expansion of macro 'GET_BITS' GET_BITS(lll,uuu,8) ^~~~~~~~ ../../../common/bzip2/decompress.c:242:7: note: in expansion of macro 'GET_UCHAR' GET_UCHAR(BZ_X_BCRC_1, uc); ^~~~~~~~~ ../../../common/bzip2/decompress.c:243:25: error: this statement may fall through [-Werror=implicit-fallthrough=] s->storedBlockCRC = (s->storedBlockCRC << 8) | ((UInt32)uc); ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../common/bzip2/decompress.c:44:4: note: here case lll: s->state = lll; \ ^ ../../../common/bzip2/decompress.c:68:4: note: in expansion of macro 'GET_BITS' GET_BITS(lll,uuu,8) ^~~~~~~~ ../../../common/bzip2/decompress.c:244:7: note: in expansion of macro 'GET_UCHAR' GET_UCHAR(BZ_X_BCRC_2, uc); ^~~~~~~~~ ../../../common/bzip2/decompress.c:245:25: error: this statement may fall through [-Werror=implicit-fallthrough=] s->storedBlockCRC = (s->storedBlockCRC << 8) | ((UInt32)uc); ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../common/bzip2/decompress.c:44:4: note: here case lll: s->state = lll; \ ^ ../../../common/bzip2/decompress.c:68:4: note: in expansion of macro 'GET_BITS' GET_BITS(lll,uuu,8) ^~~~~~~~ ../../../common/bzip2/decompress.c:246:7: note: in expansion of macro 'GET_UCHAR' GET_UCHAR(BZ_X_BCRC_3, uc); ^~~~~~~~~ ../../../common/bzip2/decompress.c:247:25: error: this statement may fall through [-Werror=implicit-fallthrough=] s->storedBlockCRC = (s->storedBlockCRC << 8) | ((UInt32)uc); ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../common/bzip2/decompress.c:44:4: note: here case lll: s->state = lll; \ ^ ../../../common/bzip2/decompress.c:68:4: note: in expansion of macro 'GET_BITS' GET_BITS(lll,uuu,8) ^~~~~~~~ ../../../common/bzip2/decompress.c:248:7: note: in expansion of macro 'GET_UCHAR' GET_UCHAR(BZ_X_BCRC_4, uc); ^~~~~~~~~ ../../../common/bzip2/decompress.c:249:25: error: this statement may fall through [-Werror=implicit-fallthrough=] s->storedBlockCRC = (s->storedBlockCRC << 8) | ((UInt32)uc); ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../common/bzip2/decompress.c:44:4: note: here case lll: s->state = lll; \ ^ ../../../common/bzip2/decompress.c:251:7: note: in expansion of macro 'GET_BITS' GET_BITS(BZ_X_RANDBIT, s->blockRandomised, 1); ^~~~~~~~ ../../../common/bzip2/decompress.c:253:18: error: this statement may fall through [-Werror=implicit-fallthrough=] s->origPtr = 0; ~~~~~~~~~~~^~~ ../../../common/bzip2/decompress.c:44:4: note: here case lll: s->state = lll; \ ^ ../../../common/bzip2/decompress.c:68:4: note: in expansion of macro 'GET_BITS' GET_BITS(lll,uuu,8) ^~~~~~~~ ../../../common/bzip2/decompress.c:254:7: note: in expansion of macro 'GET_UCHAR' GET_UCHAR(BZ_X_ORIGPTR_1, uc); ^~~~~~~~~ ../../../common/bzip2/decompress.c:255:18: error: this statement may fall through [-Werror=implicit-fallthrough=] s->origPtr = (s->origPtr << 8) | ((Int32)uc); ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../common/bzip2/decompress.c:44:4: note: here case lll: s->state = lll; \ ^ ../../../common/bzip2/decompress.c:68:4: note: in expansion of macro 'GET_BITS' GET_BITS(lll,uuu,8) ^~~~~~~~ ../../../common/bzip2/decompress.c:256:7: note: in expansion of macro 'GET_UCHAR' GET_UCHAR(BZ_X_ORIGPTR_2, uc); ^~~~~~~~~ ../../../common/bzip2/decompress.c:257:18: error: this statement may fall through [-Werror=implicit-fallthrough=] s->origPtr = (s->origPtr << 8) | ((Int32)uc); ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../common/bzip2/decompress.c:44:4: note: here case lll: s->state = lll; \ ^ ../../../common/bzip2/decompress.c:68:4: note: in expansion of macro 'GET_BITS' GET_BITS(lll,uuu,8) ^~~~~~~~ ../../../common/bzip2/decompress.c:258:7: note: in expansion of macro 'GET_UCHAR' GET_UCHAR(BZ_X_ORIGPTR_3, uc); ^~~~~~~~~ ../../../common/bzip2/decompress.c:284:17: error: this statement may fall through [-Werror=implicit-fallthrough=] alphaSize = s->nInUse+2; ~~~~~~~~~~^~~~~~~~~~~~~ ../../../common/bzip2/decompress.c:44:4: note: here case lll: s->state = lll; \ ^ ../../../common/bzip2/decompress.c:287:7: note: in expansion of macro 'GET_BITS' GET_BITS(BZ_X_SELECTOR_1, nGroups, 3); ^~~~~~~~ ../../../common/bzip2/decompress.c:288:10: error: this statement may fall through [-Werror=implicit-fallthrough=] if (nGroups < 2 || nGroups > 6) RETURN(BZ_DATA_ERROR); ^ ../../../common/bzip2/decompress.c:44:4: note: here case lll: s->state = lll; \ ^ ../../../common/bzip2/decompress.c:289:7: note: in expansion of macro 'GET_BITS' GET_BITS(BZ_X_SELECTOR_2, nSelectors, 15); ^~~~~~~~ ../../../common/bzip2/decompress.c:292:12: error: this statement may fall through [-Werror=implicit-fallthrough=] j = 0; ~~^~~ ../../../common/bzip2/decompress.c:44:4: note: here case lll: s->state = lll; \ ^ ../../../common/bzip2/decompress.c:71:4: note: in expansion of macro 'GET_BITS' GET_BITS(lll,uuu,1) ^~~~~~~~ ../../../common/bzip2/decompress.c:294:13: note: in expansion of macro 'GET_BIT' GET_BIT(BZ_X_SELECTOR_3, uc); ^~~~~~~ ../../../common/bzip2/decompress.c:321:19: error: this statement may fall through [-Werror=implicit-fallthrough=] if (curr < 1 || curr > 20) RETURN(BZ_DATA_ERROR); ^ ../../../common/bzip2/decompress.c:44:4: note: here case lll: s->state = lll; \ ^ ../../../common/bzip2/decompress.c:71:4: note: in expansion of macro 'GET_BITS' GET_BITS(lll,uuu,1) ^~~~~~~~ ../../../common/bzip2/decompress.c:322:16: note: in expansion of macro 'GET_BIT' GET_BIT(BZ_X_CODING_2, uc); ^~~~~~~ ../../../common/bzip2/decompress.c:323:19: error: this statement may fall through [-Werror=implicit-fallthrough=] if (uc == 0) break; ^ ../../../common/bzip2/decompress.c:44:4: note: here case lll: s->state = lll; \ ^ ../../../common/bzip2/decompress.c:71:4: note: in expansion of macro 'GET_BITS' GET_BITS(lll,uuu,1) ^~~~~~~~ ../../../common/bzip2/decompress.c:324:16: note: in expansion of macro 'GET_BIT' GET_BIT(BZ_X_CODING_3, uc); ^~~~~~~ ../../../common/bzip2/decompress.c:88:7: error: this statement may fall through [-Werror=implicit-fallthrough=] zn = gMinlen; \ ~~~^~~ ../../../common/bzip2/decompress.c:373:7: note: in expansion of macro 'GET_MTF_VAL' GET_MTF_VAL(BZ_X_MTF_1, BZ_X_MTF_2, nextSym); ^~~~~~~~~~~ ../../../common/bzip2/decompress.c:44:4: note: here case lll: s->state = lll; \ ^ ../../../common/bzip2/decompress.c:89:4: note: in expansion of macro 'GET_BITS' GET_BITS(label1, zvec, zn); \ ^~~~~~~~ ../../../common/bzip2/decompress.c:373:7: note: in expansion of macro 'GET_MTF_VAL' GET_MTF_VAL(BZ_X_MTF_1, BZ_X_MTF_2, nextSym); ^~~~~~~~~~~ ../../../common/bzip2/decompress.c:94:9: error: this statement may fall through [-Werror=implicit-fallthrough=] zn++; \ ~~^ ../../../common/bzip2/decompress.c:373:7: note: in expansion of macro 'GET_MTF_VAL' GET_MTF_VAL(BZ_X_MTF_1, BZ_X_MTF_2, nextSym); ^~~~~~~~~~~ ../../../common/bzip2/decompress.c:44:4: note: here case lll: s->state = lll; \ ^ ../../../common/bzip2/decompress.c:71:4: note: in expansion of macro 'GET_BITS' GET_BITS(lll,uuu,1) ^~~~~~~~ ../../../common/bzip2/decompress.c:95:7: note: in expansion of macro 'GET_BIT' GET_BIT(label2, zj); \ ^~~~~~~ ../../../common/bzip2/decompress.c:373:7: note: in expansion of macro 'GET_MTF_VAL' GET_MTF_VAL(BZ_X_MTF_1, BZ_X_MTF_2, nextSym); ^~~~~~~~~~~ ../../../common/bzip2/decompress.c:88:7: error: this statement may fall through [-Werror=implicit-fallthrough=] zn = gMinlen; \ ~~~^~~ ../../../common/bzip2/decompress.c:483:13: note: in expansion of macro 'GET_MTF_VAL' GET_MTF_VAL(BZ_X_MTF_5, BZ_X_MTF_6, nextSym); ^~~~~~~~~~~ ../../../common/bzip2/decompress.c:44:4: note: here case lll: s->state = lll; \ ^ ../../../common/bzip2/decompress.c:89:4: note: in expansion of macro 'GET_BITS' GET_BITS(label1, zvec, zn); \ ^~~~~~~~ ../../../common/bzip2/decompress.c:483:13: note: in expansion of macro 'GET_MTF_VAL' GET_MTF_VAL(BZ_X_MTF_5, BZ_X_MTF_6, nextSym); ^~~~~~~~~~~ ../../../common/bzip2/decompress.c:94:9: error: this statement may fall through [-Werror=implicit-fallthrough=] zn++; \ ~~^ ../../../common/bzip2/decompress.c:483:13: note: in expansion of macro 'GET_MTF_VAL' GET_MTF_VAL(BZ_X_MTF_5, BZ_X_MTF_6, nextSym); ^~~~~~~~~~~ ../../../common/bzip2/decompress.c:44:4: note: here case lll: s->state = lll; \ ^ ../../../common/bzip2/decompress.c:71:4: note: in expansion of macro 'GET_BITS' GET_BITS(lll,uuu,1) ^~~~~~~~ ../../../common/bzip2/decompress.c:95:7: note: in expansion of macro 'GET_BIT' GET_BIT(label2, zj); \ ^~~~~~~ ../../../common/bzip2/decompress.c:483:13: note: in expansion of macro 'GET_MTF_VAL' GET_MTF_VAL(BZ_X_MTF_5, BZ_X_MTF_6, nextSym); ^~~~~~~~~~~ ../../../common/bzip2/decompress.c:585:10: error: this statement may fall through [-Werror=implicit-fallthrough=] if (uc != 0x72) RETURN(BZ_DATA_ERROR); ^ ../../../common/bzip2/decompress.c:44:4: note: here case lll: s->state = lll; \ ^ ../../../common/bzip2/decompress.c:68:4: note: in expansion of macro 'GET_BITS' GET_BITS(lll,uuu,8) ^~~~~~~~ ../../../common/bzip2/decompress.c:586:7: note: in expansion of macro 'GET_UCHAR' GET_UCHAR(BZ_X_ENDHDR_3, uc); ^~~~~~~~~ ../../../common/bzip2/decompress.c:587:10: error: this statement may fall through [-Werror=implicit-fallthrough=] if (uc != 0x45) RETURN(BZ_DATA_ERROR); ^ ../../../common/bzip2/decompress.c:44:4: note: here case lll: s->state = lll; \ ^ ../../../common/bzip2/decompress.c:68:4: note: in expansion of macro 'GET_BITS' GET_BITS(lll,uuu,8) ^~~~~~~~ ../../../common/bzip2/decompress.c:588:7: note: in expansion of macro 'GET_UCHAR' GET_UCHAR(BZ_X_ENDHDR_4, uc); ^~~~~~~~~ ../../../common/bzip2/decompress.c:589:10: error: this statement may fall through [-Werror=implicit-fallthrough=] if (uc != 0x38) RETURN(BZ_DATA_ERROR); ^ ../../../common/bzip2/decompress.c:44:4: note: here case lll: s->state = lll; \ ^ ../../../common/bzip2/decompress.c:68:4: note: in expansion of macro 'GET_BITS' GET_BITS(lll,uuu,8) ^~~~~~~~ ../../../common/bzip2/decompress.c:590:7: note: in expansion of macro 'GET_UCHAR' GET_UCHAR(BZ_X_ENDHDR_5, uc); ^~~~~~~~~ ../../../common/bzip2/decompress.c:591:10: error: this statement may fall through [-Werror=implicit-fallthrough=] if (uc != 0x50) RETURN(BZ_DATA_ERROR); ^ ../../../common/bzip2/decompress.c:44:4: note: here case lll: s->state = lll; \ ^ ../../../common/bzip2/decompress.c:68:4: note: in expansion of macro 'GET_BITS' GET_BITS(lll,uuu,8) ^~~~~~~~ ../../../common/bzip2/decompress.c:592:7: note: in expansion of macro 'GET_UCHAR' GET_UCHAR(BZ_X_ENDHDR_6, uc); ^~~~~~~~~ ../../../common/bzip2/decompress.c:595:28: error: this statement may fall through [-Werror=implicit-fallthrough=] s->storedCombinedCRC = 0; ~~~~~~~~~~~~~~~~~~~~~^~~ ../../../common/bzip2/decompress.c:44:4: note: here case lll: s->state = lll; \ ^ ../../../common/bzip2/decompress.c:68:4: note: in expansion of macro 'GET_BITS' GET_BITS(lll,uuu,8) ^~~~~~~~ ../../../common/bzip2/decompress.c:596:7: note: in expansion of macro 'GET_UCHAR' GET_UCHAR(BZ_X_CCRC_1, uc); ^~~~~~~~~ ../../../common/bzip2/decompress.c:597:28: error: this statement may fall through [-Werror=implicit-fallthrough=] s->storedCombinedCRC = (s->storedCombinedCRC << 8) | ((UInt32)uc); ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../common/bzip2/decompress.c:44:4: note: here case lll: s->state = lll; \ ^ ../../../common/bzip2/decompress.c:68:4: note: in expansion of macro 'GET_BITS' GET_BITS(lll,uuu,8) ^~~~~~~~ ../../../common/bzip2/decompress.c:598:7: note: in expansion of macro 'GET_UCHAR' GET_UCHAR(BZ_X_CCRC_2, uc); ^~~~~~~~~ ../../../common/bzip2/decompress.c:599:28: error: this statement may fall through [-Werror=implicit-fallthrough=] s->storedCombinedCRC = (s->storedCombinedCRC << 8) | ((UInt32)uc); ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../common/bzip2/decompress.c:44:4: note: here case lll: s->state = lll; \ ^ ../../../common/bzip2/decompress.c:68:4: note: in expansion of macro 'GET_BITS' GET_BITS(lll,uuu,8) ^~~~~~~~ ../../../common/bzip2/decompress.c:600:7: note: in expansion of macro 'GET_UCHAR' GET_UCHAR(BZ_X_CCRC_3, uc); ^~~~~~~~~ ../../../common/bzip2/decompress.c:601:28: error: this statement may fall through [-Werror=implicit-fallthrough=] s->storedCombinedCRC = (s->storedCombinedCRC << 8) | ((UInt32)uc); ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../common/bzip2/decompress.c:44:4: note: here case lll: s->state = lll; \ ^ ../../../common/bzip2/decompress.c:68:4: note: in expansion of macro 'GET_BITS' GET_BITS(lll,uuu,8) ^~~~~~~~ ../../../common/bzip2/decompress.c:602:7: note: in expansion of macro 'GET_UCHAR' GET_UCHAR(BZ_X_CCRC_4, uc); ^~~~~~~~~ cc1: all warnings being treated as errors
Updated by Electric Monk over 4 years ago
- Status changed from In Progress to Closed
- % Done changed from 90 to 100
git commit db0449058042a16790d8282ecffb1a0beedaf0ea
commit db0449058042a16790d8282ecffb1a0beedaf0ea Author: Toomas Soome <tsoome@me.com> Date: 2018-04-06T19:43:10.000Z 9363 savecore: this statement may fall through Reviewed by: Yuri Pankov <yuripv@yuripv.net> Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk> Approved by: Dan McDonald <danmcd@joyent.com>
Actions