diff options
author | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2015-08-31 13:59:28 +0200 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-09-02 00:42:50 +0000 |
commit | aa1f55610b4a872eb1160a27fae1fa12cd28a5ed (patch) | |
tree | 3e10138def2ab57f0053775decd012d4f25aa1e2 /epan | |
parent | 998dcc24ed7aac331e9bcfbacee19a3db6224f8b (diff) |
MSDP: fix will never be executed [-Wunreachable-code]
Move tvbuff declaration for avoid https://llvm.org/bugs/show_bug.cgi?id=19020
Found by Clang 3.7
Change-Id: I299d2413dc4effc5e6e34c289152b8f401f19342
Reviewed-on: https://code.wireshark.org/review/10326
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-msdp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/epan/dissectors/packet-msdp.c b/epan/dissectors/packet-msdp.c index b50af560b7..1c6c61e150 100644 --- a/epan/dissectors/packet-msdp.c +++ b/epan/dissectors/packet-msdp.c @@ -383,7 +383,6 @@ static void dissect_msdp_notification(tvbuff_t *tvb, packet_info *pinfo, proto_t * correctly. Ugly. */ switch (error) { - tvbuff_t *next_tvb; case SA_REQUEST_ERROR: add_notification_data_ipv4addr(tvb, tree, offset, hf_msdp_not_group_address); break; @@ -420,7 +419,8 @@ static void dissect_msdp_notification(tvbuff_t *tvb, packet_info *pinfo, proto_t } /* Fall through */ case MESSAGE_HEADER_ERROR: - case NOTIFICATION: + case NOTIFICATION: { + tvbuff_t *next_tvb; /* Data contains the message that had an error. Even a * broken Notification message causes a Notification * message with Error Code set to Notification to be @@ -428,6 +428,7 @@ static void dissect_msdp_notification(tvbuff_t *tvb, packet_info *pinfo, proto_t */ next_tvb = tvb_new_subset_remaining(tvb, *offset); dissect_msdp(next_tvb, pinfo, tree); + } break; case FSM_ERROR: case HOLD_TIMER_EXPIRED: |