Skip to content

Commit

Permalink
Hide -Wimplicit-fallthrough= false positives
Browse files Browse the repository at this point in the history
gcc apparently groks "/* fall through */" as well as __attribute__
((fallthrough)) which probably is not supported on all compilers.
  • Loading branch information
wdoekes committed Mar 5, 2018
1 parent cfab716 commit fe2861e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
12 changes: 7 additions & 5 deletions at_response.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,10 @@ static int at_response_ok (struct pvt* pvt, at_res_t res)

case CMD_AT_D:
pvt->dialing = 1;
if(task->cpvt != &pvt->sys_chan)
if (task->cpvt != &pvt->sys_chan) {
pvt->last_dialed_cpvt = task->cpvt;
/* passthrow */

}
/* fall through */
case CMD_AT_A:
case CMD_AT_CHLD_2x:
/* not work, ^CONN: appear before OK for CHLD_ANSWER
Expand Down Expand Up @@ -459,9 +459,11 @@ static int at_response_error (struct pvt* pvt, at_res_t res)
break;

case CMD_AT_CHLD_2:
if(!CPVT_TEST_FLAG(task->cpvt, CALL_FLAG_HOLD_OTHER) || task->cpvt->state != CALL_STATE_INIT)
if (!CPVT_TEST_FLAG(task->cpvt, CALL_FLAG_HOLD_OTHER) ||
task->cpvt->state != CALL_STATE_INIT) {
break;
/* passthru */
}
/* fall through */
case CMD_AT_D:
ast_log (LOG_ERROR, "[%s] Dial failed\n", PVT_ID(pvt));
queue_control_channel (task->cpvt, AST_CONTROL_CONGESTION);
Expand Down
2 changes: 1 addition & 1 deletion chan_dongle.c
Original file line number Diff line number Diff line change
Expand Up @@ -684,8 +684,8 @@ static void * do_discovery(void * arg)
{
case DEV_STATE_RESTARTED:
pvt_stop(pvt);
/* passthru */
pvt->desired_state = DEV_STATE_STARTED;
/* fall through */
case DEV_STATE_STARTED:
pvt_start(pvt);
break;
Expand Down
4 changes: 2 additions & 2 deletions pdiscovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ static int pdiscovery_interfaces(const char * devname, const char * name, int le


#/* */
static const const struct pdiscovery_device * pdiscovery_lookup_ids(const char * devname, const char * name, int len)
static const struct pdiscovery_device * pdiscovery_lookup_ids(const char * devname, const char * name, int len)
{
unsigned vid;
unsigned pid;
Expand Down Expand Up @@ -495,7 +495,7 @@ static char * pdiscovery_handle_cimi(const char * devname, char * str)
ast_debug(4, "[%s discovery] found IMSI %s\n", devname, imsi);
return imsi;
}
// passthru
/* fall through */
default:
state = STATE_BEGIN;
}
Expand Down

0 comments on commit fe2861e

Please sign in to comment.