Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings.
authorwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 21 Jul 2011 19:10:10 +0000 (19:10 +0000)
committerwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 21 Jul 2011 19:10:10 +0000 (19:10 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38150 f5534014-38df-0310-8fa8-9805f1628bb7

plugins/gryphon/packet-gryphon.c
plugins/wimax/mac_hd_generic_decoder.c
plugins/wimax/msg_dcd.c
plugins/wimax/msg_dlmap.c
plugins/wimax/msg_dreg.c
plugins/wimax/msg_dsc.c
plugins/wimax/msg_sbc.c
plugins/wimax/wimax_compact_ulmap_ie_decoder.c

index 0c42735b139009ab30a10ecb63017a6c6ea7854c..3d445552a615bd97cdb9ccd8ad98d40196952a01 100644 (file)
@@ -200,7 +200,7 @@ dissect_gryphon_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
     proto_item      *ti;
     proto_tree      *header_tree, *body_tree, *localTree;
     proto_item      *header_item, *body_item, *localItem, *hiddenItem;
-    int             start_offset, msgend;
+    int             msgend;
     int             msglen, msgpad;
     unsigned int    src, dest, i, frmtyp;
     guint8          flags;
@@ -307,7 +307,6 @@ dissect_gryphon_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
                                     msglen + msgpad, "Body");
     body_tree = proto_item_add_subtree(body_item, ett_gryphon_body);
 
-    start_offset = offset;
     offset += MSG_HDR_SZ;
     switch (frmtyp) {
     case GY_FT_CMD:
@@ -630,7 +629,7 @@ static const value_string ioctls[] = {
 static int
 decode_command(tvbuff_t *tvb, int offset, int dst, proto_tree *pt)
 {
-    int             cmd, padding, msglen;
+    int             cmd, msglen;
     unsigned int    i;
     proto_tree      *ft;
     proto_item      *ti;
@@ -662,7 +661,6 @@ decode_command(tvbuff_t *tvb, int offset, int dst, proto_tree *pt)
     msglen -= 4;
 
     if (cmds[i].cmd_fnct && msglen > 0) {
-        padding = 3 - (msglen + 3) % 4;
         ti = proto_tree_add_text(pt, tvb, offset, -1, "Data: (%d byte%s)",
                 msglen, msglen == 1 ? "" : "s");
         ft = proto_item_add_subtree(ti, ett_gryphon_command_data);
@@ -847,12 +845,12 @@ decode_misc (tvbuff_t *tvb, int offset, proto_tree *pt)
 {
     #define         LENGTH 120
     int             padding, msglen;
-    gint            length;
+    /*gint            length;*/
     unsigned char   local_data[LENGTH+1];
 
     msglen = tvb_reported_length_remaining(tvb, offset);
     padding = 3 - (msglen + 3) % 4;
-    length = tvb_get_nstringz0(tvb, offset, LENGTH, local_data);
+    /*length =*/ tvb_get_nstringz0(tvb, offset, LENGTH, local_data);
     proto_tree_add_text(pt, tvb, offset, msglen, "Data: %s", local_data);
     offset += msglen;
     if (padding) {
index 506ced677432431058f0cd41d4d721d8d6ff8488..5c102591d2a1ee55bc0dfb5856ab78051c10dd0a 100644 (file)
@@ -714,7 +714,7 @@ void dissect_mac_header_generic_decoder(tvbuff_t *tvb, packet_info *pinfo, proto
        gint length, i, cid_index;
        guint tvb_len, ret_length, ubyte, new_tvb_len;
        guint new_payload_len = 0;
-       guint mac_ht, mac_ec, mac_esf, mac_ci, mac_eks, mac_len, mac_cid, cid;
+       guint /*mac_ht,*/ mac_ec, mac_esf, mac_ci, /*mac_eks,*/ mac_len, mac_cid, cid;
        guint ffb_grant_mgmt_subheader, packing_subheader, fragment_subheader;
        guint mesh_subheader;
        guint packing_length;
@@ -761,7 +761,7 @@ void dissect_mac_header_generic_decoder(tvbuff_t *tvb, packet_info *pinfo, proto
                /* Get the first byte */
                ubyte = tvb_get_guint8(tvb, offset);
                /* get the Header Type (HT) */
-               mac_ht = ((ubyte & WIMAX_MAC_HEADER_GENERIC_HT_MASK)?1:0);
+               /*mac_ht = ((ubyte & WIMAX_MAC_HEADER_GENERIC_HT_MASK)?1:0); XX: not used ?? */
                /* get the Encryption Control (EC) */
                mac_ec = ((ubyte & WIMAX_MAC_HEADER_GENERIC_EC_MASK)?1:0);
                /* get the sub types */
@@ -778,7 +778,7 @@ void dissect_mac_header_generic_decoder(tvbuff_t *tvb, packet_info *pinfo, proto
                /* get the CRC indicator (CI) */
                mac_ci = ((ubyte & WIMAX_MAC_HEADER_GENERIC_CI_MASK)?1:0);
                /* get the Encryption key sequence (EKS) */
-               mac_eks = ((ubyte & WIMAX_MAC_HEADER_GENERIC_EKS_MASK)>>4);
+               /*mac_eks = ((ubyte & WIMAX_MAC_HEADER_GENERIC_EKS_MASK)>>4); XX: not used ?? */
                /* get the MAC length */
                mac_len = (tvb_get_ntohs(tvb, (offset+1)) & WIMAX_MAC_HEADER_GENERIC_LEN);
                /* get the CID */
index 5b4c58517cd5101b3ad3f4c8b7e6a8be68de429c..0124bb470f061399d9e492104e6bece5be4a5804 100644 (file)
@@ -339,7 +339,6 @@ void dissect_mac_mgmt_msg_dcd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_t
 {
        guint offset = 0;
        guint tvb_len, payload_type, length;
-       guint configChangeCount;
        gint  tlv_type, tlv_len, tlv_offset, tlv_value_offset;
        guint dl_burst_diuc, dl_num_regions;
        proto_item *dcd_item = NULL;
@@ -372,8 +371,6 @@ void dissect_mac_mgmt_msg_dcd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_t
                proto_tree_add_item(dcd_tree, hf_dcd_downlink_channel_id, tvb, offset, 1, FALSE);
                /* set the offset for the Configuration Change Count */
                offset++;
-               /* get the Configuration Change Count */
-               configChangeCount = tvb_get_guint8(tvb, offset);
                /* display the Configuration Change Count */
                proto_tree_add_item(dcd_tree, hf_dcd_config_change_count, tvb, offset, 1, FALSE);
                /* set the offset for the TLV Encoded info */
index d38708d326008411625fcbe1dd05dd8bc9bc1645..0381291991d88fb9638e4f7f5c725aa16a75e16c 100644 (file)
@@ -1839,7 +1839,7 @@ gint dissect_dlmap_ie(proto_tree *ie_tree, const guint8 *bufptr, gint offset, gi
     gint alt_format = 0;
     guint data = 0;
     gint i;
-    gint papr = 0;
+    /*gint papr = 0;*/
     gint ie_len = 9;
 
     gint n_cid;
@@ -1995,7 +1995,7 @@ gint dissect_dlmap_ie(proto_tree *ie_tree, const guint8 *bufptr, gint offset, gi
         /* Downlink IE */
         alt_format = 0;
         data = 0;
-        papr = 0;
+        /*papr = 0; XX: not used ? */
         ie_len = 9;
 
         /* TODO: alt_format = 1 if (Permutation == 0x11) and (AMC type is 2x3 or 1x6) */
@@ -2012,7 +2012,7 @@ gint dissect_dlmap_ie(proto_tree *ie_tree, const guint8 *bufptr, gint offset, gi
 
         if (diuc == 13) {
             /* 8.4.5.3.1 [1] Gap/PAPR Reduction */
-            papr = 1;
+            /*papr = 1; XX: not used ? */
             proto_item_append_text(ti, " (Gap/PAPR Reduction)");
         }
 
index 9217e6485f034f27e1b67e47bd83a1d2ddce9520..aaf13332f5f48fde5892a97c551a76b402742749 100644 (file)
@@ -148,12 +148,6 @@ Action Code 03 cancels this restriction"},
 /* Decode sub-TLV's of either DREG-REQ or DREG-CMD. */
 static void dissect_dreg_tlv(proto_tree *dreg_tree, gint tlv_type, tvbuff_t *tvb, guint tlv_offset, guint tlv_len)
 {
-       guint tvb_len;
-       /*guint tlv_len;*/
-
-       /* Get the tvb reported length */
-       tvb_len =  tvb_reported_length(tvb);
-
        switch (tlv_type) {
                case DREG_PAGING_INFO:
                        proto_tree_add_item(dreg_tree, hf_dreg_paging_cycle, tvb, tlv_offset, 2, FALSE);
index 9f422c88fd452cc53831ec3c73dc012d3bf8d673..87e518ea6532b58805cf1aa212f88bec64638a9d 100644 (file)
@@ -68,7 +68,6 @@ void dissect_mac_mgmt_msg_dsc_req_decoder(tvbuff_t *tvb, packet_info *pinfo, pro
 {
        guint offset = 0;
        guint tvb_len, payload_type;
-       guint dsc_transaction_id;
        proto_item *dsc_item = NULL;
        proto_tree *dsc_tree = NULL;
 
@@ -91,8 +90,6 @@ void dissect_mac_mgmt_msg_dsc_req_decoder(tvbuff_t *tvb, packet_info *pinfo, pro
                proto_tree_add_item(dsc_tree, hf_dsc_req_message_type, tvb, offset, 1, FALSE);
                /* move to next field */
                offset++;
-               /* get the Configuration Change Count */
-               dsc_transaction_id = tvb_get_ntohs(tvb, offset);
                /* display the Transaction ID */
                proto_tree_add_item(dsc_tree, hf_dsc_transaction_id, tvb, offset, 2, FALSE);
                /* move to next field */
@@ -106,7 +103,6 @@ void dissect_mac_mgmt_msg_dsc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, pro
 {
        guint offset = 0;
        guint tvb_len, payload_type;
-       guint dsc_transaction_id;
        proto_item *dsc_item = NULL;
        proto_tree *dsc_tree = NULL;
 
@@ -129,8 +125,6 @@ void dissect_mac_mgmt_msg_dsc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, pro
                proto_tree_add_item(dsc_tree, hf_dsc_rsp_message_type, tvb, offset, 1, FALSE);
                /* move to next field */
                offset++;
-               /* get the Configuration Change Count */
-               dsc_transaction_id = tvb_get_ntohs(tvb, offset);
                /* display the Transaction ID */
                proto_tree_add_item(dsc_tree, hf_dsc_transaction_id, tvb, offset, 2, FALSE);
                /* move to next field */
@@ -148,7 +142,6 @@ void dissect_mac_mgmt_msg_dsc_ack_decoder(tvbuff_t *tvb, packet_info *pinfo, pro
 {
        guint offset = 0;
        guint tvb_len, payload_type;
-       guint dsc_transaction_id;
        proto_item *dsc_item = NULL;
        proto_tree *dsc_tree = NULL;
 
@@ -171,8 +164,6 @@ void dissect_mac_mgmt_msg_dsc_ack_decoder(tvbuff_t *tvb, packet_info *pinfo, pro
                proto_tree_add_item(dsc_tree, hf_dsc_ack_message_type, tvb, offset, 1, FALSE);
                /* move to next field */
                offset++;
-               /* get the Configuration Change Count */
-               dsc_transaction_id = tvb_get_ntohs(tvb, offset);
                /* display the Transaction ID */
                proto_tree_add_item(dsc_tree, hf_dsc_transaction_id, tvb, offset, 2, FALSE);
                /* move to next field */
index 2bc7fde35d76ee307b27645dc831204cc4653c02..6a693f24fad6a58341fccdca1e7b50a3f6ea4bec 100644 (file)
@@ -541,7 +541,7 @@ void dissect_mac_mgmt_msg_sbc_req_decoder(tvbuff_t *tvb, packet_info *pinfo, pro
        guint offset = 0;
        guint tvb_len, payload_type, value;
        gint  tlv_type, tlv_len, tlv_value_offset;
-       guint num_dl_harq_chans;
+       /*guint num_dl_harq_chans;*/
        proto_item *sbc_item = NULL;
        proto_tree *sbc_tree = NULL;
        proto_item *tlv_item = NULL;
@@ -732,7 +732,7 @@ void dissect_mac_mgmt_msg_sbc_req_decoder(tvbuff_t *tvb, packet_info *pinfo, pro
                                        tlv_tree = add_tlv_subtree(&tlv_info, ett_sbc_req_tlv_subtree, sbc_tree, hf_sbc_number_dl_arq_ack_channel, tvb, offset, tlv_len, FALSE);
                                        /* display the detail meanings of the TLV value */
                                        /* get and save the value */
-                                       num_dl_harq_chans = tvb_get_guint8(tvb, offset);
+                                       /*num_dl_harq_chans = tvb_get_guint8(tvb, offset);*/
                                        proto_tree_add_item(tlv_tree, hf_sbc_number_dl_arq_ack_channel, tvb, offset, tlv_len, FALSE);
                                break;
                                case SBC_SS_PERMUTATION_SUPPORT:
@@ -1096,7 +1096,7 @@ void dissect_mac_mgmt_msg_sbc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, pro
        guint tvb_len, payload_type, value;
        gint  tlv_type, tlv_len, tlv_value_offset;
 /*     guint ssttg, ssrtg;*/
-       guint num_dl_harq_chans; /*, num_ul_harq_chans;*/
+       /*guint num_dl_harq_chans, num_ul_harq_chans;*/
        proto_item *sbc_item = NULL;
        proto_tree *sbc_tree = NULL;
        proto_item *tlv_item = NULL;
@@ -1278,7 +1278,7 @@ void dissect_mac_mgmt_msg_sbc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, pro
                                        tlv_tree = add_tlv_subtree(&tlv_info, ett_sbc_rsp_tlv_subtree, sbc_tree, hf_sbc_number_dl_arq_ack_channel, tvb, offset, tlv_len, FALSE);
                                        /* display the detail meanings of the TLV value */
                                        /* get and save the value */
-                                       num_dl_harq_chans = tvb_get_guint8(tvb, offset);
+                                       /*num_dl_harq_chans = tvb_get_guint8(tvb, offset);*/
                                        proto_tree_add_item(tlv_tree, hf_sbc_number_dl_arq_ack_channel, tvb, offset, tlv_len, FALSE);
                                break;
                                case SBC_SS_PERMUTATION_SUPPORT:
index f389c825cd23f728510a3c19954386726620f13f..6fdc27fd96b0168cf1b79a2e336235d2a57dd70b 100644 (file)
@@ -1197,14 +1197,10 @@ static guint wimax_culmap_extension_ie_decoder(proto_tree *tree, packet_info *pi
 /* 8.4.5.4.3 (table 290) */
 guint wimax_cdma_allocation_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, guint offset, guint nibble_offset)
 {
-       guint byte;
-
 #ifdef DEBUG
        /* update the info column */
        col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "CDMA Allocation IE");
 #endif
-       /* Get the first byte */
-       byte = tvb_get_guint8(tvb, offset);
        if(nibble_offset & 1)
        {       /* display the Duration */
                proto_tree_add_item(tree, hf_cdma_allocation_duration_1, tvb, offset, 2, FALSE);