LNET: Fix gcc 7 compiler complaints

Change-Id: Idad6411139226cb6694b8dad5cb2107882f90848
Reviewed-on: https://code.wireshark.org/review/25102
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Michael Mann 2018-01-01 14:11:26 -05:00 committed by Anders Broman
parent 098fbc70ee
commit 4b7700db4b
1 changed files with 4 additions and 6 deletions

View File

@ -387,13 +387,10 @@ dissect_csum(tvbuff_t * tvb, packet_info *pinfo, proto_tree *tree, int offset, g
{
guint32 csum;
proto_item *ti;
gboolean error = FALSE;
csum = tvb_get_letohl(tvb, offset);
// @@ convert this to proto_tree_add_checksum()
switch (lnd_type) {
default:
error = TRUE;
case SOCKLND:
ti = proto_tree_add_item(tree, hf_lnet_ib_csum, tvb, offset, 4, ENC_LITTLE_ENDIAN);
break;
@ -401,11 +398,12 @@ dissect_csum(tvbuff_t * tvb, packet_info *pinfo, proto_tree *tree, int offset, g
case O2IBLND:
ti = proto_tree_add_item(tree, hf_lnet_ksm_csum, tvb, offset, 4, ENC_LITTLE_ENDIAN);
break;
}
if (error)
expert_add_info_format(pinfo, ti, &ei_lnet_type, "Checksum for unprocessed type: %s",
default:
expert_add_info_format(pinfo, NULL, &ei_lnet_type, "Checksum for unprocessed type: %s",
val_to_str(lnd_type, lndnames, "Unknown(%d)"));
break;
}
if (csum == 0)
proto_item_append_text(ti, " (DISABLED)");