Actions
Bug #9216
closedawk: this statement may fall through
Start date:
2018-02-28
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
Description
This issue is about both awk and awk_xpg4. Identified by gcc 7 build:
awk4.c: In function 'dosub': awk4.c:247:3: error: this statement may fall through [-Werror=implicit-fallthrough=] awkerr(nomem); ^~~~~~~~~~~~~ awk4.c:248:2: note: here default: ^~~~~~~ awk4.c: In function 'f_split': awk4.c:387:6: error: this statement may fall through [-Werror=implicit-fallthrough=] if (isstring(tnp->n_flags) && tnp->n_string==_null) ^ awk4.c:389:2: note: here default: ^~~~~~~ awk3.c: In function 'assign': awk3.c:270:3: error: this statement may fall through [-Werror=implicit-fallthrough=] awkerr(gettext("cannot assign to function \"%s\""), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ left->n_name); ~~~~~~~~~~~~~ awk3.c:273:2: note: here default: ^~~~~~~ awk3.c: In function 'action': awk3.c:748:8: error: this statement may fall through [-Werror=implicit-fallthrough=] if (isstring(l->n_flags) && ^ awk3.c:751:4: note: here default: ^~~~~~~ awk3.c:688:4: error: this statement may fall through [-Werror=implicit-fallthrough=] doend(act); ^~~~~~~~~~ awk3.c:691:3: note: here case RETURN: ^~~~ awk1.c: In function 'yylex': awk1.c:558:8: error: this statement may fall through [-Werror=implicit-fallthrough=] if (nbrace != 0) ^ awk1.c:561:4: note: here default: ^~~~~~~ awk1.c: In function 'lexid': awk1.c:797:4: error: this statement may fall through [-Werror=implicit-fallthrough=] ++inprint; ^~~~~~~~~ awk1.c:798:3: note: here default: ^~~~~~~ awk.h:57:18: error: this statement may fall through [-Werror=implicit-fallthrough=] #define FATAL ), error(1, errbuf) ^~~~~~~~~~~~~~~~ b.c:640:23: note: in expansion of macro 'FATAL' lastre, prestr FATAL; ^~~~~ b.c:642:2: note: here default: ^~~~~~~ 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 b2be350e700b2900626f0977c47dddefdf617cfd
commit b2be350e700b2900626f0977c47dddefdf617cfd Author: Toomas Soome <tsoome@me.com> Date: 2018-03-11T06:17:18.000Z 9216 awk: this statement may fall through Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk> Reviewed by: Jason King <jason.brian.king@gmail.com> Reviewed by: C Fraire <cfraire@me.com> Approved by: Joshua M. Clulow <josh@sysmgr.org>
Actions