From 349735613dc3e02340dc73a1dd5397310c4552c5 Mon Sep 17 00:00:00 2001 From: Dario Lombardo Date: Fri, 1 Mar 2019 09:02:22 +0100 Subject: [PATCH] ieee802154: fix compilation with gcc-4. Error: ../epan/dissectors/packet-ieee802154.c: In function 'dissect_ieee802154_header_ie': ../epan/dissectors/packet-ieee802154.c:3788:10: error: variable 'remaining' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered] gint remaining = tvb_reported_length_remaining(tvb, offset) - IEEE802154_MIC_LENGTH(packet->security_level); ^ Change-Id: I6dadaa9e502f8f38bf476b690395727c836172fd Reviewed-on: https://code.wireshark.org/review/32283 Petri-Dish: Dario Lombardo Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris --- epan/dissectors/packet-ieee802154.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epan/dissectors/packet-ieee802154.c b/epan/dissectors/packet-ieee802154.c index d3c5fb677c..168e3f0469 100644 --- a/epan/dissectors/packet-ieee802154.c +++ b/epan/dissectors/packet-ieee802154.c @@ -3785,7 +3785,7 @@ dissect_ieee802154_header_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree volatile guint offset = orig_offset; proto_item *ies_item = proto_tree_add_item(tree, hf_ieee802154_header_ies, tvb, offset, -1, ENC_NA); proto_tree *ies_tree = proto_item_add_subtree(ies_item, ett_ieee802154_header_ie); - gint remaining = tvb_reported_length_remaining(tvb, offset) - IEEE802154_MIC_LENGTH(packet->security_level); + volatile gint remaining = tvb_reported_length_remaining(tvb, offset) - IEEE802154_MIC_LENGTH(packet->security_level); // Loop as long as we don't: //