dissectors: fix this statement may fall through [-Werror=implicit-fallthrough=] found by gcc7

Change-Id: Iba6238988ded675cba328ab512232d1919d93b4a
Reviewed-on: https://code.wireshark.org/review/20415
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
Alexis La Goutte 2017-03-05 19:38:59 +01:00 committed by Michael Mann
parent 70e04f3f4c
commit c1e6724cf6
21 changed files with 23 additions and 13 deletions

View File

@ -914,12 +914,12 @@ const gchar* gsm_map_opr_code(guint32 val, proto_item *item) {
case 44: /*mt-forwardSM*/
/* FALLTHRU */
case 46: /*mo-forwardSM*/
/* FALLTHRU */
if (application_context_version < 3) {
proto_item_set_text(item, "%s (%d)", val_to_str_const(val, gsm_map_V1V2_opr_code_strings, "Unknown GSM-MAP opcode"), val);
return val_to_str_const(val, gsm_map_V1V2_opr_code_strings, "Unknown GSM-MAP opcode");
}
/* Else use the default map operation translation */
/* FALLTHRU */
default:
return val_to_str_ext_const(val, &gsm_old_GSMMAPOperationLocalvalue_vals_ext, "Unknown GSM-MAP opcode");
break;

View File

@ -1130,7 +1130,7 @@ dissect_asp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
case ASPFUNC_TICKLE:
case ASPFUNC_WRTCONT:
proto_tree_add_item(asp_tree, hf_asp_zero_value, tvb, offset, 4, ENC_NA);
/* fall */
/* FALL THROUGH */
case ASPFUNC_ATTN: /* FIXME capture and spec disagree */
default:
proto_item_set_len(asp_tree, 4);

View File

@ -9441,7 +9441,7 @@ static int dissect_tep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
}
}
/* FALL THROUGH TO REQUEST */
/* FALL THROUGH */
case TEP_PDU_REQUEST:

View File

@ -2952,7 +2952,7 @@ static int dissect_edonkey_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree
dissector = dissect_edonkey_tcp_message;
break;
}
/* FALL THROUGH */
default:
message_name = "Unknown";
dissector = NULL;

View File

@ -4033,7 +4033,7 @@ dissect_reply_body (tvbuff_t *tvb, guint offset, packet_info *pinfo,
*/
/* FALL THROUGH */
case NO_EXCEPTION:

View File

@ -21260,12 +21260,12 @@ const gchar* gsm_map_opr_code(guint32 val, proto_item *item) {
case 44: /*mt-forwardSM*/
/* FALLTHRU */
case 46: /*mo-forwardSM*/
/* FALLTHRU */
if (application_context_version < 3) {
proto_item_set_text(item, "%s (%d)", val_to_str_const(val, gsm_map_V1V2_opr_code_strings, "Unknown GSM-MAP opcode"), val);
return val_to_str_const(val, gsm_map_V1V2_opr_code_strings, "Unknown GSM-MAP opcode");
}
/* Else use the default map operation translation */
/* FALLTHRU */
default:
return val_to_str_ext_const(val, &gsm_old_GSMMAPOperationLocalvalue_vals_ext, "Unknown GSM-MAP opcode");
break;

View File

@ -1654,6 +1654,7 @@ dissect_ieee802154_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g
/* Try heuristic dissection. */
if (dissector_try_heuristic(ieee802154_heur_subdissector_list, payload_tvb, pinfo, tree, &hdtbl_entry, packet)) break;
/* Fall-through to dump undissectable payloads. */
/* FALL THROUGH */
default:
/* Could not subdissect, call the data dissector instead. */
call_data_dissector(payload_tvb, pinfo, tree);

View File

@ -1746,6 +1746,7 @@ skip_lrh:
}
}
/* otherwise fall through and start parsing BTH */
/* FALL THROUGH */
case IBA_LOCAL: {
proto_item *base_transport_header_item;
proto_tree *base_transport_header_tree;
@ -5385,6 +5386,7 @@ skip_lrh:
* Fall through switch and start parsing Local Headers and BTH
* }
*/
/* FALL THROUGH */
case IBA_LOCAL:
bthFollows = TRUE;

View File

@ -654,7 +654,7 @@ dissect_isns_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
/* Fall Thru if there are attributes */
if (tvb_reported_length_remaining(tvb, offset) == 0)
return tvb_captured_length(tvb);
/* FALL THROUGH */
/* Messages */
case ISNS_FUNC_DEVATTRREG:
case ISNS_FUNC_DEVATTRQRY:

View File

@ -1436,6 +1436,7 @@ static l2tpv3_session_t *store_l2_sublayer(l2tpv3_session_t *_session,
case MESSAGE_TYPE_ICCN:
case MESSAGE_TYPE_OCCN:
session->lcce1.l2_specific = result;
/* FALL THROUGH */
case MESSAGE_TYPE_ICRP:
case MESSAGE_TYPE_OCRP:
session->lcce2.l2_specific = result;

View File

@ -5651,6 +5651,7 @@ dissect_nas_eps_plain(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
call_dissector(gsm_a_dtap_handle, new_tvb,pinfo, nas_eps_tree);
break;
} /* else fall through default */
/* FALL THROUGH */
default:
proto_tree_add_expert_format(nas_eps_tree, pinfo, &ei_nas_eps_unknown_pd, tvb, offset, -1, "Not a NAS EPS PD %u (%s)",
pd, val_to_str_const(pd, protocol_discriminator_vals, "Unknown"));
@ -5803,6 +5804,7 @@ dissect_nas_eps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
call_dissector(gsm_a_dtap_handle, new_tvb, pinfo, nas_eps_tree);
break;
} /* else fall through default */
/* FALL THROUGH */
default:
proto_tree_add_expert_format(nas_eps_tree, pinfo, &ei_nas_eps_unknown_pd, tvb, offset, -1, "Not a NAS EPS PD %u (%s)",
pd, val_to_str_const(pd, protocol_discriminator_vals, "Unknown"));

View File

@ -326,6 +326,7 @@ dissect_nbifom(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _
if (pinfo->link_dir == P2P_DIR_DL) {
break;
} /* else fall through case 4 */
/* FALL THROUGH */
case 4:
dissect_nbifom_routing_rules(tvb, pinfo, subtree, offset, param_contents_len);
offset += param_contents_len;

View File

@ -1135,7 +1135,7 @@ dissect_ncp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
break;
}
}
/* otherwise fall through */
/* fall through */
case NCP_POSITIVE_ACK: /* Positive Acknowledgement */
case NCP_SERVICE_REQUEST: /* Server NCP Request */

View File

@ -1181,6 +1181,7 @@ dissect_ntp_ctrl(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *ntp_tree)
* then data part could be the same as if opcode is NTPCTRL_OP_READVAR
* --> so, no "break" here!
*/
/* FALL THROUGH */
case NTPCTRL_OP_READVAR:
case NTPCTRL_OP_WRITEVAR:
case NTPCTRL_OP_READCLOCK:

View File

@ -1383,6 +1383,7 @@ dissect_cell_header(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void
case PWATM_MODE_AAL5_SDU:
DISSECTOR_ASSERT(pd->submode == PWATM_SUBMODE_ADMIN_CELL);
/*fallthrough for ATM admin cell submode only*/
/* FALL THROUGH */
case PWATM_MODE_N1_CW:
case PWATM_MODE_N1_NOCW:
pd->vpi = (tvb_get_ntohs (tvb, 0) >> 4);

View File

@ -229,7 +229,7 @@ dissect_rip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
}
if(is_md5_auth && tvb_reported_length_remaining(tvb, offset) == 20)
break;
/* Intentional fall through: auth Entry MUST be the first! */
/* Intentional fall through */ /* auth Entry MUST be the first! */
default:
proto_tree_add_expert_format(rip_tree, pinfo, &ei_rip_unknown_address_family, tvb, offset,
RIP_ENTRY_LENGTH, "Unknown address family %u", family);

View File

@ -570,7 +570,7 @@ dissect_osd_attributes_list(packet_info *pinfo, tvbuff_t *tvb, int offset,
/* user object id */
dissect_osd_user_object_id(tvb, offset, tt);
offset += 8;
/* fallthrough to the next case */
/* fallthrough */
case 0x09: /* retrieved/set attributes OSD-1: 7.1.3.3 OSD-2: 7.1.4.3*/
offset = dissect_osd_attribute_list_entry(pinfo, tvb, tt, ti, offset, lun_info, osd2);
break;

View File

@ -5186,7 +5186,7 @@ dissect_inbound_stream(proto_tree *tn3270_tree, packet_info *pinfo, tvbuff_t *tv
/* XXX: Is this the correct/complete set of AID bytes for this case ? */
if (tvb_reported_length_remaining(tvb, offset) <= 0)
break;
/* fall into next */
/* FALL THROUGH */
case AID_READ_PARTITION_AID:
case AID_NO_AID_GENERATED:
case AID_NO_AID_GENERATED_PRINTER_ONLY:

View File

@ -3233,8 +3233,8 @@ decode_cs_ip_device_routing(proto_tree *tree _U_, tvbuff_t *tvb,
{
/* XXX: What is the point of this assignment? */
framing_rtp = tvb_get_guint8(tvb, offset + 3);
/* FALLTHROUGH */
}
/* FALLTHROUGH */
case 0x01: /* Date Of End Of Communication */
case 0x02: /* Node Number */
case 0x03: /* Ticket Protocol Version */

View File

@ -999,6 +999,7 @@ ucp_handle_mt(proto_tree *tree, packet_info* pinfo, tvbuff_t *tvb, int *offset)
case '4': /* TMsg, no of bits */
ucp_handle_string(tree, tvb, hf_ucp_parm_NB, offset);
/* fall through here for the data piece */
/* FALLTHROUGH */
case '2':
ucp_handle_data(tree, tvb, hf_ucp_data_section, offset);
break;

View File

@ -3422,7 +3422,7 @@ static void dissect_x11_request(tvbuff_t *tvb, packet_info *pinfo,
}
/* QueryExtension expects a reply, fall through */
/* FALLTHROUGH */
case X_AllocColor:
case X_AllocColorCells:
case X_AllocColorPlanes: