Skip to content

Commit fe78427

Browse files
committed
Fix [-Wimplicit-fallthrough] warnings in FPM SAPI
1 parent ffabc09 commit fe78427

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

sapi/fpm/fpm/fpm_conf.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@ static char *fpm_conf_set_time(zval *value, void **config, intptr_t offset) /* {
307307
case 's' : /* s is the default suffix */
308308
val[len-1] = '\0';
309309
suffix = '0';
310+
fallthrough;
310311
default :
311312
if (suffix < '0' || suffix > '9') {
312313
return "unknown suffix used in time value";

sapi/fpm/fpm/fpm_process_ctl.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,21 +217,24 @@ void fpm_pctl(int new_state, int action) /* {{{ */
217217
case FPM_PCTL_STATE_RELOADING :
218218
/* 'reloading' can be overridden by 'finishing' */
219219
if (new_state == FPM_PCTL_STATE_FINISHING) break;
220+
fallthrough;
220221
case FPM_PCTL_STATE_FINISHING :
221222
/* 'reloading' and 'finishing' can be overridden by 'terminating' */
222223
if (new_state == FPM_PCTL_STATE_TERMINATING) break;
224+
fallthrough;
223225
case FPM_PCTL_STATE_TERMINATING :
224226
/* nothing can override 'terminating' state */
225227
zlog(ZLOG_DEBUG, "not switching to '%s' state, because already in '%s' state",
226228
fpm_state_names[new_state], fpm_state_names[fpm_state]);
227229
return;
230+
/* TODO Add EMPTY_SWITCH_DEFAULT_CASE? */
228231
}
229232

230233
fpm_signal_sent = 0;
231234
fpm_state = new_state;
232235

233236
zlog(ZLOG_DEBUG, "switching to '%s' state", fpm_state_names[fpm_state]);
234-
/* fall down */
237+
fallthrough;
235238

236239
case FPM_PCTL_ACTION_TIMEOUT :
237240
fpm_pctl_action_next();

0 commit comments

Comments
 (0)