diff options
author | Jeff Morriss <jeff.morriss.ws@gmail.com> | 2015-10-25 21:03:36 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-10-26 11:28:41 +0000 |
commit | 7f591e4c07e10168f06a6a0dbb04bc66613836a7 (patch) | |
tree | a064d584a8e7b70bcdee795c96c5efe56fa937c8 /epan/dissectors | |
parent | e2203f5aed1eef900c7568b6d14f3e303e271b7c (diff) |
Clean up more unnecessary use of the 'volatile' key word.
Change-Id: I3e72fddc6ed380780d7e2e1c8df87e580138188d
Reviewed-on: https://code.wireshark.org/review/11271
Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/packet-6lowpan.c | 10 | ||||
-rw-r--r-- | epan/dissectors/packet-bgp.c | 3 | ||||
-rw-r--r-- | epan/dissectors/packet-cast.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-dcerpc.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-fw1.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-gmhdr.c | 12 | ||||
-rw-r--r-- | epan/dissectors/packet-ieee80211.c | 10 | ||||
-rw-r--r-- | epan/dissectors/packet-mac-lte.c | 29 | ||||
-rw-r--r-- | epan/dissectors/packet-mp2t.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-rpc.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-sflow.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-ssl.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-turbocell.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-vlan.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-vmlab.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-x11.c | 22 |
16 files changed, 58 insertions, 58 deletions
diff --git a/epan/dissectors/packet-6lowpan.c b/epan/dissectors/packet-6lowpan.c index 87fb5f6539..22ae344382 100644 --- a/epan/dissectors/packet-6lowpan.c +++ b/epan/dissectors/packet-6lowpan.c @@ -995,12 +995,12 @@ dissect_6lowpan_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void * static int dissect_6lowpan(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { - proto_tree *volatile lowpan_tree = NULL; - proto_item *volatile lowpan_root = NULL; - tvbuff_t * next = tvb; + proto_tree *lowpan_tree = NULL; + proto_item *lowpan_root = NULL; + tvbuff_t *next = tvb; /* Interface identifier of the encapsulating layer. */ - guint8 src_iid[LOWPAN_IFC_ID_LEN]; - guint8 dst_iid[LOWPAN_IFC_ID_LEN]; + guint8 src_iid[LOWPAN_IFC_ID_LEN]; + guint8 dst_iid[LOWPAN_IFC_ID_LEN]; /* Get the interface identifiers from the encapsulating layer. */ lowpan_dlsrc_to_ifcid(pinfo, src_iid); diff --git a/epan/dissectors/packet-bgp.c b/epan/dissectors/packet-bgp.c index 99a4e3c897..beed817b26 100644 --- a/epan/dissectors/packet-bgp.c +++ b/epan/dissectors/packet-bgp.c @@ -6480,7 +6480,7 @@ dissect_bgp_capability(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo) } static void -dissect_bgp_pdu(tvbuff_t *volatile tvb, packet_info *pinfo, proto_tree *tree, +dissect_bgp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean first) { guint16 bgp_len; /* Message length */ @@ -6634,7 +6634,6 @@ dissect_bgp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) bgp_tree = proto_item_add_subtree(ti, ett_bgp); proto_tree_add_item(bgp_tree, hf_bgp_continuation, tvb, 0, offset, ENC_NA); -; } /* diff --git a/epan/dissectors/packet-cast.c b/epan/dissectors/packet-cast.c index ae51e95ea8..c008b41607 100644 --- a/epan/dissectors/packet-cast.c +++ b/epan/dissectors/packet-cast.c @@ -1025,7 +1025,7 @@ dissect_cast(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) * CAST-Packet: {Header(Size, Reserved)|Data(MessageID, Message-Data)} */ /* Header fields */ - volatile guint32 hdr_data_length; + guint32 hdr_data_length; guint32 hdr_marker; /* check, if this is really an SKINNY packet, they start with a length + 0 */ diff --git a/epan/dissectors/packet-dcerpc.c b/epan/dissectors/packet-dcerpc.c index 6c5ca8f130..b6cbc4f612 100644 --- a/epan/dissectors/packet-dcerpc.c +++ b/epan/dissectors/packet-dcerpc.c @@ -1162,7 +1162,7 @@ static void dissect_auth_verf(tvbuff_t *auth_tvb, packet_info *pinfo, e_dce_cn_common_hdr_t *hdr, dcerpc_auth_info *auth_info) { - dcerpc_dissect_fnct_t *volatile fn = NULL; + dcerpc_dissect_fnct_t *fn = NULL; /* XXX - "stub" a fake DCERPC INFO STRUCTURE If a dcerpc_info is really needed, update the call stacks to include it diff --git a/epan/dissectors/packet-fw1.c b/epan/dissectors/packet-fw1.c index 92b6544e42..d6280cf5c0 100644 --- a/epan/dissectors/packet-fw1.c +++ b/epan/dissectors/packet-fw1.c @@ -126,7 +126,7 @@ dissect_fw1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { /* Set up structures needed to add the protocol subtree and manage it */ proto_item *ti; - proto_tree *volatile fh_tree = NULL; + proto_tree *fh_tree = NULL; char direction; char chain; char *interface_name; diff --git a/epan/dissectors/packet-gmhdr.c b/epan/dissectors/packet-gmhdr.c index cd2bdf4c21..a746713324 100644 --- a/epan/dissectors/packet-gmhdr.c +++ b/epan/dissectors/packet-gmhdr.c @@ -219,12 +219,12 @@ dissect_gmtlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *gmhdr_tree, gui static void dissect_gmhdr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - proto_tree *ti; - gint16 length; - volatile guint16 encap_proto; - volatile gboolean is_802_2; - proto_tree *volatile gmhdr_tree = NULL; - volatile guint offset = 0; + proto_tree *ti; + gint16 length; + guint16 encap_proto; + gboolean is_802_2; + proto_tree *gmhdr_tree = NULL; + guint offset = 0; length = tvb_get_guint8(tvb, offset); /* Length of the Gigamon header */ diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c index d077b42b73..738f8f31d1 100644 --- a/epan/dissectors/packet-ieee80211.c +++ b/epan/dissectors/packet-ieee80211.c @@ -13316,7 +13316,7 @@ dissect_neighbor_report(tvbuff_t *tvb, packet_info *pinfo, guint32 sub_tag_length; proto_item *parent_item; proto_tree *bssid_info_subtree, *bssid_info_cap_subtree, *sub_tag_tree; - tvbuff_t *volatile sub_tag_tvb = NULL; + tvbuff_t *sub_tag_tvb = NULL; if (tag_len < 13) { expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, @@ -16470,10 +16470,10 @@ dissect_ieee80211_common (tvbuff_t *tvb, packet_info *pinfo, IS_80211AD(phdr->frequency) : FALSE); - volatile encap_t encap_type; - proto_tree *volatile hdr_tree = NULL; - tvbuff_t *volatile next_tvb = NULL; - wlan_hdr_t *volatile whdr; + encap_t encap_type; + proto_tree *hdr_tree = NULL; + tvbuff_t *next_tvb = NULL; + wlan_hdr_t *whdr; AIRPDCAP_KEY_ITEM used_key; diff --git a/epan/dissectors/packet-mac-lte.c b/epan/dissectors/packet-mac-lte.c index 8cbbe16c3a..a4e89e6619 100644 --- a/epan/dissectors/packet-mac-lte.c +++ b/epan/dissectors/packet-mac-lte.c @@ -2066,7 +2066,8 @@ static guint8 get_mac_lte_channel_priority(guint16 ueid _U_, guint8 lcid, guint8 direction); -static void call_with_catch_all(dissector_handle_t handle, tvbuff_t* tvb, packet_info *pinfo, proto_tree *tree) +static void +call_with_catch_all(dissector_handle_t handle, tvbuff_t* tvb, packet_info *pinfo, proto_tree *tree) { /* Call it (catch exceptions so that stats will be updated) */ TRY { @@ -2984,7 +2985,7 @@ static void call_rlc_dissector(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr /* For DL frames, look for previous Tx. Add link back if found */ -static void TrackReportedDLHARQResend(packet_info *pinfo, tvbuff_t *tvb, volatile int length, +static void TrackReportedDLHARQResend(packet_info *pinfo, tvbuff_t *tvb, int length, proto_tree *tree, mac_lte_info *p_mac_lte_info) { DLHARQResult *result = NULL; @@ -3138,7 +3139,7 @@ int is_mac_lte_frame_retx(packet_info *pinfo, guint8 direction) /* Track UL frames, so that when a retx is indicated, we can search for the original tx. We will either find it, and provide a link back to it, or flag that we couldn't find as an expert error */ -static void TrackReportedULHARQResend(packet_info *pinfo, tvbuff_t *tvb, volatile int offset, +static void TrackReportedULHARQResend(packet_info *pinfo, tvbuff_t *tvb, int offset, proto_tree *tree, mac_lte_info *p_mac_lte_info, proto_item *retx_ti) { @@ -3704,18 +3705,18 @@ static void lookup_rlc_channel_from_lcid(guint16 ueid, /* UL-SCH and DL-SCH formats have much in common, so handle them in a common function */ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, - proto_item *pdu_ti, volatile guint32 offset, + proto_item *pdu_ti, guint32 offset, mac_lte_info *p_mac_lte_info, mac_lte_tap_info *tap_info, proto_item *retx_ti, proto_tree *context_tree, guint pdu_instance) { guint8 extension; - volatile guint16 n; + guint16 n; proto_item *truncated_ti; proto_item *padding_length_ti; /* Keep track of LCIDs and lengths as we dissect the header */ - volatile guint16 number_of_headers = 0; + guint16 number_of_headers = 0; guint8 lcids[MAX_HEADERS_IN_PDU]; gint16 pdu_lengths[MAX_HEADERS_IN_PDU]; @@ -3727,7 +3728,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree gboolean have_seen_non_padding_control = FALSE; gboolean have_seen_bsr = FALSE; gboolean expecting_body_data = FALSE; - volatile guint32 is_truncated = FALSE; + guint32 is_truncated = FALSE; /* Maintain/show UEs/TTI count */ tap_info->ueInTTI = count_ues_tti(p_mac_lte_info, pinfo); @@ -5002,7 +5003,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree /* Data SDUs treated identically for Uplink or downlink channels */ proto_item *sdu_ti; - volatile guint16 data_length; + guint16 data_length; gboolean rlc_called_for_sdu = FALSE; /* Break out if meet padding */ @@ -5051,7 +5052,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree tvbuff_t *rrc_tvb = tvb_new_subset_length(tvb, offset, data_length); /* Get appropriate dissector handle */ - volatile dissector_handle_t protocol_handle = 0; + dissector_handle_t protocol_handle = 0; if (p_mac_lte_info->direction == DIRECTION_UPLINK) { protocol_handle = find_dissector("lte_rrc.ul_ccch"); } @@ -5213,16 +5214,16 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree } static void dissect_mch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *pdu_ti, - volatile guint32 offset, mac_lte_info *p_mac_lte_info) + guint32 offset, mac_lte_info *p_mac_lte_info) { guint8 extension; - volatile guint16 n; + guint16 n; proto_item *truncated_ti; proto_item *padding_length_ti; proto_item *hidden_root_ti; /* Keep track of LCIDs and lengths as we dissect the header */ - volatile guint16 number_of_headers = 0; + guint16 number_of_headers = 0; guint8 lcids[MAX_HEADERS_IN_PDU]; gint16 pdu_lengths[MAX_HEADERS_IN_PDU]; @@ -5233,7 +5234,7 @@ static void dissect_mch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pro guint8 number_of_padding_subheaders = 0; gboolean have_seen_non_padding_control = FALSE; gboolean expecting_body_data = FALSE; - volatile guint32 is_truncated = FALSE; + guint32 is_truncated = FALSE; write_pdu_label_and_info_literal(pdu_ti, NULL, pinfo, "MCH: "); @@ -5537,7 +5538,7 @@ static void dissect_mch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pro for (; n < number_of_headers; n++) { proto_item *sdu_ti; - volatile guint16 data_length; + guint16 data_length; /* Break out if meet padding */ if (lcids[n] == PADDING_LCID) { diff --git a/epan/dissectors/packet-mp2t.c b/epan/dissectors/packet-mp2t.c index 233b5fc2e3..c457e9e5e2 100644 --- a/epan/dissectors/packet-mp2t.c +++ b/epan/dissectors/packet-mp2t.c @@ -1085,13 +1085,13 @@ dissect_mp2t_adaptation_field(tvbuff_t *tvb, gint offset, proto_tree *tree) } static void -dissect_tsp(tvbuff_t *tvb, volatile gint offset, packet_info *pinfo, +dissect_tsp(tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, conversation_t *conv) { guint32 header; guint afc; gint start_offset = offset; - volatile gint payload_len; + gint payload_len; mp2t_analysis_data_t *mp2t_data; pid_analysis_data_t *pid_analysis; diff --git a/epan/dissectors/packet-rpc.c b/epan/dissectors/packet-rpc.c index 2244ae48e9..f0a06ea478 100644 --- a/epan/dissectors/packet-rpc.c +++ b/epan/dissectors/packet-rpc.c @@ -3132,7 +3132,7 @@ dissect_rpc_fragment(tvbuff_t *tvb, int offset, packet_info *pinfo, { guint32 seq; guint32 rpc_rm; - volatile guint32 len; + guint32 len; gint32 seglen; gint tvb_len, tvb_reported_len; tvbuff_t *frag_tvb; diff --git a/epan/dissectors/packet-sflow.c b/epan/dissectors/packet-sflow.c index 8b9d29c513..c91ca00828 100644 --- a/epan/dissectors/packet-sflow.c +++ b/epan/dissectors/packet-sflow.c @@ -2253,7 +2253,7 @@ dissect_sflow_245(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat struct sflow_address_type addr_type; guint32 numsamples; - volatile guint offset = 0; + guint offset = 0; guint i = 0; addr_type.hf_addr_v4 = hf_sflow_agent_address_v4; diff --git a/epan/dissectors/packet-ssl.c b/epan/dissectors/packet-ssl.c index 59ad4b640e..1a7645e953 100644 --- a/epan/dissectors/packet-ssl.c +++ b/epan/dissectors/packet-ssl.c @@ -885,7 +885,7 @@ decrypt_ssl3_record(tvbuff_t *tvb, packet_info *pinfo, guint32 offset, } static void -process_ssl_payload(tvbuff_t *tvb, volatile int offset, packet_info *pinfo, +process_ssl_payload(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, SslSession *session); static void @@ -1310,7 +1310,7 @@ export_pdu_packet(tvbuff_t *tvb, packet_info *pinfo, guint tag, const gchar *nam } static void -process_ssl_payload(tvbuff_t *tvb, volatile int offset, packet_info *pinfo, +process_ssl_payload(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, SslSession *session) { tvbuff_t *next_tvb; diff --git a/epan/dissectors/packet-turbocell.c b/epan/dissectors/packet-turbocell.c index 789c1e52c9..0a3a8c3689 100644 --- a/epan/dissectors/packet-turbocell.c +++ b/epan/dissectors/packet-turbocell.c @@ -182,7 +182,7 @@ dissect_turbocell(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } else { - tvbuff_t *volatile msdu_tvb = NULL; + tvbuff_t *msdu_tvb = NULL; guint32 msdu_offset = 0x04; guint16 j = 1; guint16 msdu_length; diff --git a/epan/dissectors/packet-vlan.c b/epan/dissectors/packet-vlan.c index 5f7d258bcc..e87c559f70 100644 --- a/epan/dissectors/packet-vlan.c +++ b/epan/dissectors/packet-vlan.c @@ -139,9 +139,9 @@ dissect_vlan(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { proto_item *ti; guint16 tci; - volatile guint16 encap_proto; - volatile gboolean is_802_2; - proto_tree *volatile vlan_tree; + guint16 encap_proto; + gboolean is_802_2; + proto_tree *vlan_tree; col_set_str(pinfo->cinfo, COL_PROTOCOL, "VLAN"); col_clear(pinfo->cinfo, COL_INFO); diff --git a/epan/dissectors/packet-vmlab.c b/epan/dissectors/packet-vmlab.c index fe951a12c9..26332b5ce2 100644 --- a/epan/dissectors/packet-vmlab.c +++ b/epan/dissectors/packet-vmlab.c @@ -74,7 +74,7 @@ static const value_string fragment_vals[] = { static void dissect_vmlab(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - proto_tree* volatile vmlab_tree; + proto_tree* vmlab_tree; proto_item* ti; guint32 offset=0; @@ -83,7 +83,7 @@ dissect_vmlab(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) guint8 portgroup; ethertype_data_t ethertype_data; - volatile guint16 encap_proto; + guint16 encap_proto; col_set_str(pinfo->cinfo, COL_PROTOCOL, "VMLAB"); col_clear(pinfo->cinfo, COL_INFO); diff --git a/epan/dissectors/packet-x11.c b/epan/dissectors/packet-x11.c index da36203796..dd6afe25f9 100644 --- a/epan/dissectors/packet-x11.c +++ b/epan/dissectors/packet-x11.c @@ -1296,27 +1296,27 @@ static const value_string zero_is_none_vals[] = { static void dissect_x11_initial_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, - const char *sep, x11_conv_data_t *volatile state, + const char *sep, x11_conv_data_t *state, guint byte_order); static void dissect_x11_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, - const char *volatile sep, x11_conv_data_t *volatile state, + const char *sep, x11_conv_data_t *state, guint byte_order); static void dissect_x11_error(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, - const char *volatile sep, x11_conv_data_t *volatile state, + const char *sep, x11_conv_data_t *state, guint byte_order); static void dissect_x11_event(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, - const char *volatile sep, x11_conv_data_t *volatile state, + const char *sep, x11_conv_data_t *state, guint byte_order); static void decode_x11_event(tvbuff_t *tvb, unsigned char eventcode, const char *sent, - proto_tree *t, x11_conv_data_t *volatile state, + proto_tree *t, x11_conv_data_t *state, guint byte_order); static x11_conv_data_t * @@ -3118,7 +3118,7 @@ static void dissect_x11_initial_conn(tvbuff_t *tvb, packet_info *pinfo, } static void dissect_x11_initial_reply(tvbuff_t *tvb, packet_info *pinfo, - proto_tree *tree, const char _U_ *sep, x11_conv_data_t *volatile state, + proto_tree *tree, const char _U_ *sep, x11_conv_data_t *state, guint byte_order) { int offset = 0, *offsetp = &offset, left; @@ -4814,7 +4814,7 @@ dissect_x11_replies(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { /* Set up structures we will need to add the protocol subtree and manage it */ volatile int offset, plen; - tvbuff_t * volatile next_tvb; + tvbuff_t *volatile next_tvb; conversation_t *conversation; x11_conv_data_t *volatile state; volatile guint byte_order; @@ -4944,7 +4944,7 @@ dissect_x11_replies(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) static void dissect_x11_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, - const char *volatile sep, x11_conv_data_t *volatile state, + const char *sep, x11_conv_data_t *state, guint byte_order) { int offset = 0, *offsetp = &offset, length, left, opcode; @@ -5341,7 +5341,7 @@ same_screen_focus(tvbuff_t *tvb, int *offsetp, proto_tree *t) static void dissect_x11_event(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, - const char *volatile sep, x11_conv_data_t *volatile state, + const char *sep, x11_conv_data_t *state, guint byte_order) { unsigned char eventcode; @@ -5375,7 +5375,7 @@ dissect_x11_event(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, static void decode_x11_event(tvbuff_t *tvb, unsigned char eventcode, const char *sent, - proto_tree *t, x11_conv_data_t *volatile state, + proto_tree *t, x11_conv_data_t *state, guint byte_order) { int offset = 0, *offsetp = &offset, left; @@ -5689,7 +5689,7 @@ decode_x11_event(tvbuff_t *tvb, unsigned char eventcode, const char *sent, static void dissect_x11_error(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, - const char *volatile sep, x11_conv_data_t *volatile state _U_, + const char *sep, x11_conv_data_t *state _U_, guint byte_order) { int offset = 0, *offsetp = &offset, left; |