Fix some gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings;
authorwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 20 Jun 2011 01:13:21 +0000 (01:13 +0000)
committerwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 20 Jun 2011 01:13:21 +0000 (01:13 +0000)
(Code commented out since it may be required in the future (at least in some cases).

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37723 f5534014-38df-0310-8fa8-9805f1628bb7

14 files changed:
epan/dissectors/packet-dect.c
epan/dissectors/packet-fc.c
epan/dissectors/packet-lapdm.c
epan/dissectors/packet-nbipx.c
epan/dissectors/packet-ncp-nmas.c
epan/dissectors/packet-ncp-sss.c
epan/dissectors/packet-pdcp-lte.c
epan/dissectors/packet-pvfs2.c
epan/dissectors/packet-rsip.c
epan/dissectors/packet-smb-pipe.c
epan/dissectors/packet-ssl-utils.c
epan/dissectors/packet-tapa.c
epan/dissectors/packet-v52.c
epan/dissectors/packet-x224.c

index e591b1f16dc162a6c737d8cb0774907da29c4281..3b6dcedd2d466d7af689209e21682b2ed6d74050 100644 (file)
@@ -1258,7 +1258,7 @@ static gint
 dissect_bfield(gboolean dect_packet_type _U_, guint8 ba,
        packet_info *pinfo _U_, tvbuff_t *tvb, gint offset, proto_tree *DectTree, proto_tree *ColumnsTree)
 {
-       guint8 xcrc, xcrclen;
+       guint8 xcrc/*, xcrclen*/;
        guint16 blen;
        gint start_offset;
        char *bfield_str;
@@ -1290,21 +1290,21 @@ dissect_bfield(gboolean dect_packet_type _U_, guint8 ba,
        case 5:
        case 6:
                blen=40;
-               xcrclen=4;
+               /*xcrclen=4;*/
 
                bfield_short_str="Full Slot";
                bfield_str="Full Slot (320 bit data, 4 bit xcrc)";
                break;
        case 2:
                blen=100;
-               xcrclen=4;
+               /*xcrclen=4;*/
 
                bfield_short_str="Double Slot";
                bfield_str="Double Slot (800 bit data, 4 bit xcrc)";
                break;
        case 4:
                blen=10;
-               xcrclen=4;
+               /*xcrclen=4;*/
 
                bfield_short_str="Half Slot";
                bfield_str="Half Slot (80 bit data, 4 bit xcrc)";
@@ -1312,7 +1312,7 @@ dissect_bfield(gboolean dect_packet_type _U_, guint8 ba,
        case 7:
        default:
                blen=0;
-               xcrclen=0;
+               /*xcrclen=0;*/
 
                bfield_short_str="No B-Field";
                bfield_str="No B-Field";
index 645e38b02810c6b10468441eae484353aa0eaa2a..7aecad064d29d9732c2ffd7b201e1966a1dbf41a 100644 (file)
@@ -697,7 +697,7 @@ dissect_fc_helper (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean
     tvbuff_t *next_tvb;
     int offset = 0, next_offset;
     int vft_offset = -1;
-    gboolean is_lastframe_inseq, is_1frame_inseq, is_valid_frame;
+    gboolean is_lastframe_inseq, is_1frame_inseq/*, is_valid_frame*/;
     gboolean is_exchg_resp = 0;
     fragment_data *fcfrag_head;
     guint32 frag_id;
@@ -708,7 +708,7 @@ dissect_fc_helper (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean
     guint32 param;
     guint16 real_seqcnt;
     guint8 ftype;
-    gboolean is_ack;
+    /*gboolean is_ack;*/
 
     static fc_hdr fchdr;
     itlq_nexus_t *fc_ex=NULL;
@@ -842,7 +842,7 @@ dissect_fc_helper (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean
 
     fchdr.itlq=fc_ex;
 
-    is_ack = ((fchdr.r_ctl == 0xC0) || (fchdr.r_ctl == 0xC1));
+    /*is_ack = ((fchdr.r_ctl == 0xC0) || (fchdr.r_ctl == 0xC1));*/
 
     /* There are two ways to determine if this is the first frame of a
      * sequence. Either:
@@ -856,7 +856,7 @@ dissect_fc_helper (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean
     is_lastframe_inseq = ((pinfo->sof_eof & PINFO_EOF_LAST_FRAME) == PINFO_EOF_LAST_FRAME);
 
     is_lastframe_inseq |= fchdr.fctl & FC_FCTL_SEQ_LAST;
-    is_valid_frame = ((pinfo->sof_eof & 0x40) == 0x40);
+    /*is_valid_frame = ((pinfo->sof_eof & 0x40) == 0x40);*/
 
     ftype = fc_get_ftype (fchdr.r_ctl, fchdr.type);
 
index 18cf0c72a1f8e84fb98d41671b4d0e1f394ce2df..b770e22e8f12d5a0a35e0f024dac58501e4e24d3 100644 (file)
@@ -215,7 +215,7 @@ dissect_lapdm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 {
     proto_tree *lapdm_tree, *addr_tree, *length_tree;
     proto_item *lapdm_ti, *addr_ti, *length_ti;
-    guint8 addr, length, cr, sapi, len, n_s;
+    guint8 addr, length, cr, sapi, len/*, n_s*/;
     int control;
     gboolean m;
     tvbuff_t *payload;
@@ -272,7 +272,7 @@ dissect_lapdm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
     sapi = (addr & LAPDM_SAPI) >> LAPDM_SAPI_SHIFT;
     len = (length & LAPDM_LEN) >> LAPDM_LEN_SHIFT;
-    n_s = (control & XDLC_N_S_MASK) >> XDLC_N_S_SHIFT;
+    /*n_s = (control & XDLC_N_S_MASK) >> XDLC_N_S_SHIFT;*/
     m = (length & LAPDM_M) >> LAPDM_M_SHIFT;
     available_length = tvb_length(tvb) - LAPDM_HEADER_LEN;
 
index b291d0f5932eb3f9cffbabaf3abc3b4c044a10dc..953f02bc7e89d471d8ba1424ce1007bcf1698050 100644 (file)
@@ -668,7 +668,7 @@ dissect_nmpi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        char            name[(NETBIOS_NAME_LEN - 1)*4 + 1];
        int             name_type;
        char            node_name[(NETBIOS_NAME_LEN - 1)*4 + 1];
-       int             node_name_type = 0;
+       /*int           node_name_type = 0;*/
        tvbuff_t        *next_tvb;
 
        col_set_str(pinfo->cinfo, COL_PROTOCOL, "NMPI");
@@ -689,7 +689,7 @@ dissect_nmpi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        opcode = tvb_get_guint8(tvb, offset);
        nmpi_name_type = tvb_get_guint8(tvb, offset+1);
        name_type = get_netbios_name(tvb, offset+4, name, (NETBIOS_NAME_LEN - 1)*4 + 1);
-       node_name_type = get_netbios_name(tvb, offset+20, node_name, (NETBIOS_NAME_LEN - 1)*4 + 1);
+       /*node_name_type = */get_netbios_name(tvb, offset+20, node_name, (NETBIOS_NAME_LEN - 1)*4 + 1);
 
        if (check_col(pinfo->cinfo, COL_INFO)) {
                switch (opcode) {
index fe40e14485e2c35fb4b9bdd0ba6b09e3ddfe5d88..ef9ed3d9c17203ab4e0a64f484c0ca16654e239d 100644 (file)
@@ -282,7 +282,7 @@ nmas_string(tvbuff_t* tvb, int hfinfo, proto_tree *nmas_tree, int offset, gboole
 void
 dissect_nmas_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ncp_tree, ncp_req_hash_value *request_value)
 {
-    guint8              func, subfunc = 0;
+    guint8              /*func,*/ subfunc;
     guint32             msg_length=0, cur_string_len=0;
     guint32             foffset;
     guint32             subverb=0;
@@ -292,7 +292,7 @@ dissect_nmas_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ncp_tree, nc
     proto_item          *aitem;
 
     foffset = 6;
-    func = tvb_get_guint8(tvb, foffset);
+    /*func = tvb_get_guint8(tvb, foffset);*/
     foffset += 1;
     subfunc = tvb_get_guint8(tvb, foffset);
     foffset += 1;
index 46a6a9c4f5e9e37ac8ba036039bff59e1abf982f..bc6d5cfdd0fc1aa7090da7c074b730a5102b2120 100644 (file)
@@ -521,7 +521,7 @@ sss_string(tvbuff_t* tvb, int hfinfo, proto_tree *sss_tree, int offset, gboolean
 void
 dissect_sss_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ncp_tree, ncp_req_hash_value *request_value)
 {
-    guint8              func, subfunc = 0;
+    guint8              /*func,*/ subfunc = 0;
     guint32             subverb=0;
     guint32             msg_length=0;
     guint32             foffset= 0;
@@ -533,7 +533,7 @@ dissect_sss_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ncp_tree, ncp
         return;
     }
     foffset = 6;
-    func = tvb_get_guint8(tvb, foffset);
+    /*func = tvb_get_guint8(tvb, foffset);*/
     foffset += 1;
     subfunc = tvb_get_guint8(tvb, foffset);
     foffset += 1;
index f84d08d0866d1172e0e5215dac60bb4d6d0465f1..310606be92c862019c76bc2309ce318a8209d3ce 100644 (file)
@@ -747,7 +747,7 @@ static int dissect_pdcp_dynamic_chain(proto_tree *tree,
         proto_item *root_ti;
         int tree_start_offset = offset;
         guint8     rx;
-        guint8     contributing_csrcs;
+        /*guint8     contributing_csrcs;*/
         guint16    sequence_number;
         guint32    timestamp;
         guint8     tis=0, tss=0;
@@ -761,7 +761,7 @@ static int dissect_pdcp_dynamic_chain(proto_tree *tree,
         /* V | P | RX | CC */
         rx = tvb_get_guint8(tvb, offset) & 0x10;
         proto_tree_add_item(dynamic_rtp_tree, hf_pdcp_lte_rohc_dynamic_rtp_rx, tvb, offset, 1, FALSE);
-        contributing_csrcs = tvb_get_guint8(tvb, offset) & 0x0f;
+        /*contributing_csrcs = tvb_get_guint8(tvb, offset) & 0x0f;*/
         proto_tree_add_item(dynamic_rtp_tree, hf_pdcp_lte_rohc_dynamic_rtp_cc, tvb, offset, 1, FALSE);
         offset += 1;
 
index 81186706f73767a94ead765d4c6112263d203907..8542757dc10298e845cdfc1c8be6990fba015791 100644 (file)
@@ -2412,7 +2412,7 @@ dissect_pvfs2_getconfig_response(tvbuff_t *tvb, proto_tree *parent_tree,
        char *ptr = NULL;
        proto_item *item = NULL, *config_item = NULL;
        proto_tree *tree = NULL, *config_tree = NULL;
-       guint8 truncated = 0;
+       /*guint8 truncated = 0;*/
 
        if (parent_tree)
        {
@@ -2459,7 +2459,7 @@ dissect_pvfs2_getconfig_response(tvbuff_t *tvb, proto_tree *parent_tree,
        {
                total_config_bytes = length_remaining;
 
-               truncated = 1;
+               /*truncated = 1;*/
        }
 
        bytes_processed = 0;
index 5861735155035f815f13b56d480e9f4181a03e5c..86182b23f0b894bf4f2c0c63e60297f78a5a8a65 100644 (file)
@@ -981,12 +981,12 @@ dissect_rsip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        proto_item      *ti;
        proto_tree      *rsip_tree;
        guint8          msgtype;
-       gboolean        msgcnt_required;
+       /*gboolean      msgcnt_required;*/
        int             eoff;
 
        msgtype = tvb_get_guint8(tvb, 1);
 
-       msgcnt_required = (pinfo->ipproto == IP_PROTO_UDP)? TRUE : FALSE;
+       /*msgcnt_required = (pinfo->ipproto == IP_PROTO_UDP)? TRUE : FALSE;*/
 
        col_set_str(pinfo->cinfo, COL_PROTOCOL, "RSIP");
 
index 8a313edee6dbd291936596558c81b68b897ffc0a..35675efb0d2905bacbb606d3a55b611f82efbe43 100644 (file)
@@ -2626,7 +2626,7 @@ dissect_pipe_lanman(tvbuff_t *pd_tvb, tvbuff_t *p_tvb, tvbuff_t *d_tvb,
 {
        smb_info_t *smb_info = pinfo->private_data;
        smb_transact_info_t *trp = NULL;
-       int offset = 0, start_offset;
+       int offset = 0/*, start_offset*/;
        guint16 cmd;
        guint16 status;
        int convert;
@@ -2720,7 +2720,7 @@ dissect_pipe_lanman(tvbuff_t *pd_tvb, tvbuff_t *p_tvb, tvbuff_t *d_tvb,
                lanman = find_lanman(cmd);
 
                /* request parameters */
-               start_offset = offset;
+               /*start_offset = offset;*/
                offset = dissect_request_parameters(p_tvb, offset, pinfo, tree,
                    param_descrip, lanman->req, &has_data);
 
index e41f2b9e8f6e093d4b22f6bc566100da061baefc..34050eb7251eb677f13d7b42c16383cc84315019 100644 (file)
@@ -1088,9 +1088,9 @@ ssl_cipher_setiv(SSL_CIPHER_CTX *cipher, guchar* iv, gint iv_len)
     /* guchar * ivp; */
     gint ret;
     /* gint i; */
-    gcry_cipher_hd_t c;
+    /* gcry_cipher_hd_t c; */
     ret=0;
-    c=(gcry_cipher_hd_t)*cipher;
+    /*c=(gcry_cipher_hd_t)*cipher;*/
 
     ssl_debug_printf("--------------------------------------------------------------------");
     /*for(ivp=c->iv,i=0; i < iv_len; i++ )
index 68d3d7f1bbe3e4f4e57a66ad9c346df5b17e1b57..1bc7bc388e67552c178ad88c7b2a0b7eacd9f660 100644 (file)
@@ -1,4 +1,4 @@
-/* packet-3com-tapa.c
+/* packet-tapa.c
  * Routines for the disassembly of the Trapeze TAPA protocol
  *
  * $Id$
@@ -127,10 +127,12 @@ static const value_string tapa_discover_request_vals[] = {
        { 0,    NULL }
 };
 
+#if 0
 static const value_string tapa_discover_unknown_vals[] = {
 
        { 0,    NULL }
 };
+#endif
 
 static gboolean
 check_ascii(tvbuff_t *tvb, gint offset, gint length)
@@ -231,12 +233,12 @@ dissect_tapa_discover_unknown_new_tlv(tvbuff_t *tvb, packet_info *pinfo, proto_t
        guint8           item_type;
        gint             item_length;
        const gchar     *item_text;
-       const gchar     *item_type_text;
+       /*const gchar   *item_type_text;*/
        gboolean         is_ascii;
 
        while (remaining > 0) {
                item_type = tvb_get_guint8(tvb, offset);
-               item_type_text = val_to_str(item_type, tapa_discover_unknown_vals, "%d");
+               /*item_type_text = val_to_str(item_type, tapa_discover_unknown_vals, "%d");*/
                item_length = tvb_get_ntohs(tvb, offset + 2) - 4;
 
                DISSECTOR_ASSERT(item_length > 0);
index 8d8571beaf45eb9db60a2217ac51e652ed90b3c1..b3edca93d76a12181fe6deebbbb080c8699d6a68 100644 (file)
@@ -1938,13 +1938,13 @@ static void
 dissect_v52_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 {
     int     offset = 4;
-    guint8      info_element, info_element_length;
-    int     old_offset;
+    guint8  info_element, info_element_length;
+    /*int     old_offset;*/
     int     singleoctet;
 
     while(tvb_length_remaining(tvb,offset)){
         singleoctet = 0;
-        old_offset = offset;
+        /* old_offset = offset; */
         info_element = tvb_get_guint8(tvb, offset);
         switch(info_element){
             case PSTN_SEQUENCE_NUMBER:
@@ -2113,12 +2113,12 @@ dissect_v52_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
         if (singleoctet == 1) {
             offset += 1;
         }
-/*
+#if 0
         if (old_offset <= offset) {
             expert_add_info_format(pinfo, NULL, PI_MALFORMED, PI_WARN, "Zero-length information element");
             return;
         }
-*/
+#endif
     }
 }
 
index 1676e91bbda90d6863d89367f3c001b6b0391073..f93031d5f5bda96ecf3cc9db9ad9107dc19142fd 100644 (file)
@@ -99,7 +99,7 @@ static const value_string class_option_vals[] = {
 static int
 dissect_x224_cr(packet_info *pinfo _U_, proto_tree *tree, tvbuff_t *tvb, int offset, x224_conv_info_t *x224_info _U_)
 {
-       guint8 class;
+       /*guint8 class;*/
        gint len, next_offset;
 
        /*DST-REF is always 0 */
@@ -110,7 +110,7 @@ dissect_x224_cr(packet_info *pinfo _U_, proto_tree *tree, tvbuff_t *tvb, int off
        offset+=2;
 
        /* class options */
-       class = tvb_get_guint8(tvb, offset);
+       /*class = tvb_get_guint8(tvb, offset);*/
        proto_tree_add_item(tree, hf_x224_class, tvb, offset, 1, FALSE);
        offset+=1;