Skip to content

Commit 16859a6

Browse files
committed
Fix [-Wimplicit-fallthrough] warnings in Iconv extension
1 parent 1c208ad commit 16859a6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ext/iconv/iconv.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1514,6 +1514,8 @@ static php_iconv_err_t _php_iconv_mime_decode(smart_str *pretval, const char *st
15141514
} else {
15151515
break;
15161516
}
1517+
/* TODO might want to rearrange logic so this is more obvious */
1518+
fallthrough;
15171519

15181520
case 9: /* choice point, seeing what to do next.*/
15191521
switch (*p1) {
@@ -1537,7 +1539,7 @@ static php_iconv_err_t _php_iconv_mime_decode(smart_str *pretval, const char *st
15371539
break;
15381540
}
15391541
}
1540-
/* break is omitted intentionally */
1542+
fallthrough;
15411543

15421544
case '\r': case '\n': case ' ': case '\t': {
15431545
zend_string *decoded_text;
@@ -1688,7 +1690,7 @@ static php_iconv_err_t _php_iconv_mime_decode(smart_str *pretval, const char *st
16881690
scan_stat = 1;
16891691
break;
16901692
}
1691-
/* break is omitted intentionally */
1693+
fallthrough;
16921694

16931695
default:
16941696
_php_iconv_appendc(pretval, *p1, cd_pl);

0 commit comments

Comments
 (0)