Skip to content

Commit 08e3160

Browse files
committed
Fix [-Wimplicit-fallthrough] warnings in PHPDBG SAPI
1 parent fe78427 commit 08e3160

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

sapi/phpdbg/phpdbg_cmd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ PHPDBG_API zend_bool phpdbg_match_param(const phpdbg_param_t *l, const phpdbg_pa
258258
if (l->num != r->num) {
259259
break;
260260
}
261-
/* break intentionally omitted */
261+
fallthrough;
262262

263263
case STR_PARAM:
264264
return (l->len == r->len) &&
@@ -288,7 +288,7 @@ PHPDBG_API zend_bool phpdbg_match_param(const phpdbg_param_t *l, const phpdbg_pa
288288
if (l->num != r->num) {
289289
break;
290290
}
291-
/* break intentionally omitted */
291+
fallthrough;
292292

293293
case METHOD_PARAM: {
294294
size_t lengths[2] = {

sapi/phpdbg/phpdbg_out.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ static int format_converter(register buffy *odp, const char *fmt, zend_bool esca
305305
fmt++;
306306
}
307307
/* these are promoted to int, so no break */
308+
fallthrough;
308309
default:
309310
modifier = LM_STD;
310311
break;
@@ -755,6 +756,7 @@ static int format_converter(register buffy *odp, const char *fmt, zend_bool esca
755756
* Note that we can't point s inside fmt because the
756757
* unknown <char> could be preceded by width etc.
757758
*/
759+
fallthrough;
758760
default:
759761
char_buf[0] = '%';
760762
char_buf[1] = *fmt;

sapi/phpdbg/phpdbg_watch.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ zend_bool phpdbg_check_watch_diff(phpdbg_watchtype type, void *oldPtr, void *new
133133
if (memcmp(&((Bucket *) oldPtr)->h, &((Bucket *) newPtr)->h, sizeof(Bucket) - sizeof(zval) /* key/val comparison */) != 0) {
134134
return 2;
135135
}
136+
/* TODO: Is this intentional? */
137+
fallthrough;
136138
case WATCH_ON_ZVAL:
137139
return memcmp(oldPtr, newPtr, sizeof(zend_value) + sizeof(uint32_t) /* value + typeinfo */) != 0;
138140
case WATCH_ON_HASHTABLE:

0 commit comments

Comments
 (0)