Fix gcc -Wshadow warnings
authorwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 19 Jan 2010 00:37:39 +0000 (00:37 +0000)
committerwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 19 Jan 2010 00:37:39 +0000 (00:37 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31561 f5534014-38df-0310-8fa8-9805f1628bb7

16 files changed:
epan/dissectors/packet-ncp-sss.c
epan/dissectors/packet-ndps.c
epan/dissectors/packet-netflow.c
epan/dissectors/packet-nfs.c
epan/dissectors/packet-nsip.c
epan/dissectors/packet-ntlmssp.c
epan/dissectors/packet-olsr.c
epan/dissectors/packet-ospf.c
epan/dissectors/packet-packetbb.c
epan/dissectors/packet-per.c
epan/dissectors/packet-pgm.c
epan/dissectors/packet-pop.c
epan/dissectors/packet-portmap.c
epan/dissectors/packet-ptp.c
epan/dissectors/packet-pw-common.c
epan/dissectors/packet-pw-hdlc.c

index 6d9249f4988bdc72c596daa1a285231675103674..68438bb69d8aa415a2e407e68821dec07862f9ed 100644 (file)
@@ -35,7 +35,7 @@
 #include "packet-ncp-int.h"
 #include "packet-ncp-sss.h"
 
-static guint32 subverb=0;
+static guint32 gbl_subverb=0;
 
 static gint ett_sss = -1;
 
@@ -601,21 +601,21 @@ dissect_sss_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ncp_tree, ncp
             proto_tree_add_item(ncp_tree, hf_length, tvb, foffset, 4, TRUE);
             foffset += 4;
             foffset += 12; /* Blank Context */
-            subverb = tvb_get_letohl(tvb, foffset);
+            gbl_subverb = tvb_get_letohl(tvb, foffset);
             if (check_col(pinfo->cinfo, COL_INFO)) {
-                col_append_fstr(pinfo->cinfo, COL_INFO, ", %s", val_to_str(subverb, sss_verb_enum, "Unknown (%d)"));
+                col_append_fstr(pinfo->cinfo, COL_INFO, ", %s", val_to_str(gbl_subverb, sss_verb_enum, "Unknown (%d)"));
             }
             aitem = proto_tree_add_item(ncp_tree, hf_verb, tvb, foffset, 4, TRUE);
             atree = proto_item_add_subtree(aitem, ett_sss);
             if (request_value) {
-                request_value->req_nds_flags=subverb;
+                request_value->req_nds_flags=gbl_subverb;
             }
             foffset += 4;
             process_flags(atree, tvb, foffset);
             foffset += 4;
             proto_tree_add_item(atree, hf_context, tvb, foffset, 4, FALSE);
             foffset += 4;
-            switch (subverb) {
+            switch (gbl_subverb) {
             case 0:
                 foffset += 4;
                 foffset = sss_string(tvb, hf_user, atree, foffset, TRUE, 0);
index 4c009b862a2778f1a3269c46211edc984af39077..0c113d9186f1b5fe193b237882490e4793e24b38 100644 (file)
@@ -2324,13 +2324,13 @@ objectidentification(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
 static int
 print_address(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
 {
-    guint32     address_type=0;
-    guint32     address_len=0;
+    guint32     addr_type=0;
+    guint32     addr_len=0;
 
-    address_type = tvb_get_ntohl(tvb, foffset);
-    proto_tree_add_uint(ndps_tree, hf_ndps_address, tvb, foffset, 4, address_type);
+    addr_type = tvb_get_ntohl(tvb, foffset);
+    proto_tree_add_uint(ndps_tree, hf_ndps_address, tvb, foffset, 4, addr_type);
     foffset += 4;
-    address_len = tvb_get_ntohl(tvb, foffset);
+    addr_len = tvb_get_ntohl(tvb, foffset);
     proto_tree_add_item(ndps_tree, hf_address_len, tvb, foffset, 4, FALSE);
     foffset += 4;
     /*
@@ -2340,7 +2340,7 @@ print_address(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
      * XXX - should this code - and the code in packet-ncp2222.inc to
      * dissect addresses - check the length for the types it supports?
      */
-    switch(address_type)
+    switch(addr_type)
     {
     case 0x00000000:
         proto_tree_add_item(ndps_tree, hf_ndps_net, tvb, foffset, 4, FALSE);
@@ -2354,20 +2354,20 @@ print_address(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
     default:
         break;
     }
-    tvb_ensure_bytes_exist(tvb, foffset, address_len);
-    foffset += address_len;
-    return foffset+(address_len%4);
+    tvb_ensure_bytes_exist(tvb, foffset, addr_len);
+    foffset += addr_len;
+    return foffset+(addr_len%4);
 }
 
 static int
 address_item(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
 {
-    guint32     address_type=0;
+    guint32     addr_type=0;
 
-    address_type = tvb_get_ntohl(tvb, foffset);
-    proto_tree_add_uint(ndps_tree, hf_address_type, tvb, foffset, 4, address_type);
+    addr_type = tvb_get_ntohl(tvb, foffset);
+    proto_tree_add_uint(ndps_tree, hf_address_type, tvb, foffset, 4, addr_type);
     foffset += 4;
-    switch(address_type)
+    switch(addr_type)
     {
     case 0:
     case 1:
@@ -4332,12 +4332,12 @@ ndps_defrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     guint                 len=0;
     tvbuff_t            *next_tvb = NULL;
     fragment_data       *fd_head;
-    spx_info            *spx_info;
+    spx_info            *spx_info_p;
     ndps_req_hash_value        *request_value = NULL;
     conversation_t      *conversation;
 
     /* Get SPX info from SPX dissector */
-    spx_info = pinfo->private_data;
+    spx_info_p = pinfo->private_data;
     /* Check to see if defragmentation is enabled in the dissector */
     if (!ndps_defragment) {
         dissect_ndps(tvb, pinfo, tree);
@@ -4380,7 +4380,7 @@ ndps_defrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
         return;
     }
     /* Check to see of this is a fragment. If so then mark as a fragment. */
-    if (!spx_info->eom) {
+    if (!spx_info_p->eom) {
         request_value->ndps_frag = TRUE;
     }
     /* Now we process the fragments */
@@ -4393,11 +4393,11 @@ ndps_defrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
         len = tvb_reported_length(tvb);
         if (tvb_length(tvb) >= len)
         {
-            fd_head = fragment_add_seq_next(tvb, 0, pinfo, tid, ndps_fragment_table, ndps_reassembled_table, len, !spx_info->eom);
+            fd_head = fragment_add_seq_next(tvb, 0, pinfo, tid, ndps_fragment_table, ndps_reassembled_table, len, !spx_info_p->eom);
             if (fd_head != NULL)
             {
                 /* Is this the last fragment? EOM will indicate */
-                if (fd_head->next != NULL && spx_info->eom)
+                if (fd_head->next != NULL && spx_info_p->eom)
                 {
                     proto_item *frag_tree_item;
 
@@ -4425,7 +4425,7 @@ ndps_defrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                     next_tvb = tvb_new_subset_remaining(tvb, 0);
                     if (check_col(pinfo->cinfo, COL_INFO))
                     {
-                      if (!spx_info->eom)
+                      if (!spx_info_p->eom)
                       {
                         col_append_str(pinfo->cinfo, COL_INFO, "[NDPS Fragment]");
                       }
@@ -4437,7 +4437,7 @@ ndps_defrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                 /* Fragment from first pass of dissection */
                 if (check_col(pinfo->cinfo, COL_INFO))
                 {
-                  if (!spx_info->eom)
+                  if (!spx_info_p->eom)
                   {
                     col_append_str(pinfo->cinfo, COL_INFO, "[NDPS Fragment]");
                   }
@@ -4461,7 +4461,7 @@ ndps_defrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
         else
         {
             /* This is the end fragment so dissect and mark end */
-            if (spx_info->eom) {
+            if (spx_info_p->eom) {
                 request_value->ndps_frag = FALSE;
                 dissect_ndps(next_tvb, pinfo, tree);
             }
index 6044db24c75be19109994f33b42ae3822cb8e0de..9abb069b05c6bf60a89a59708c9590ec272d6451 100644 (file)
@@ -3961,11 +3961,11 @@ dissect_pdu(tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * pdutree, int o
 }
 
 static const gchar   *
-getprefix(const guint32 * address, int prefix)
+getprefix(const guint32 * addr, int prefix)
 {
        guint32         gprefix;
 
-       gprefix = *address & g_htonl((0xffffffff << (32 - prefix)));
+       gprefix = *addr & g_htonl((0xffffffff << (32 - prefix)));
 
        return (ip_to_str((const guint8 *)&gprefix));
 }
index 24e3d188ba2a190b958978d6d4809261c8dd5a6e..8cd9e027833bc0699276e4399aa1e676b4153edc 100644 (file)
@@ -2354,15 +2354,15 @@ static int
 dissect_ftype(tvbuff_t *tvb, int offset, proto_tree *tree, const char* name)
 {
        guint32 ftype;
-       const char* ftype_name = NULL;
+       const char* ftype_name_p = NULL;
 
        ftype = tvb_get_ntohl(tvb, offset+0);
 
        if (tree) {
-               ftype_name = val_to_str(ftype, nfs2_ftype, "%u");
+               ftype_name_p = val_to_str(ftype, nfs2_ftype, "%u");
 
                proto_tree_add_text(tree, tvb, offset, 4,
-                       "%s: %s (%u)", name, ftype_name, ftype);
+                       "%s: %s (%u)", name, ftype_name_p, ftype);
        }
 
        offset += 4;
index 8b9f2b8291b414e714943e18ed523959d0c09072..51210205af96cc0923d4900d2eafab315f68c1f3 100644 (file)
@@ -518,14 +518,14 @@ decode_iei_reset_flag(nsip_ie_t *ie, build_info_t *bi, int ie_start_offset) {
 
 static void 
 decode_iei_ip_address(nsip_ie_t *ie, build_info_t *bi, int ie_start_offset) {
-  guint8 address_type;
+  guint8 addr_type;
   guint32 ip4_addr;
   struct e_in6_addr ip6_addr;
 
-  address_type = tvb_get_guint8(bi->tvb, bi->offset);
+  addr_type = tvb_get_guint8(bi->tvb, bi->offset);
   proto_tree_add_item(bi->nsip_tree, hf_nsip_ip_address_type,
                          bi->tvb, bi->offset, 1, FALSE);
-  switch (address_type) {
+  switch (addr_type) {
   case NSIP_IP_ADDRESS_TYPE_IPV4:
     ie->total_length = 2 + ipv4_element.address_length;
     ip4_addr = tvb_get_ipv4(bi->tvb, bi->offset+1);
index ae059da531310d403a28dcaad430761f89ab698c..d80ad2e2866b2faec168bd5710036a835f3692aa 100644 (file)
@@ -84,7 +84,7 @@ typedef struct _md4_pass {
   guint8 md4[NTLMSSP_KEY_LEN];
 } md4_pass;
 
-static unsigned char zeros[24] = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
+static unsigned char gbl_zeros[24] = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
 static GHashTable* hash_packet = NULL;
 
 /*
@@ -247,7 +247,7 @@ static gint ett_ntlmssp_ntlmv2_response = -1;
 static gint ett_ntlmssp_ntlmv2_response_name = -1;
 
 /* Configuration variables */
-static const char *nt_password = NULL;
+static const char *gbl_nt_password = NULL;
 
 #define MAX_BLOB_SIZE 256
 typedef struct _ntlmssp_blob {
@@ -471,7 +471,7 @@ get_md4pass_list(md4_pass** p_pass_list,const char* nt_password)
        *p_pass_list = ep_alloc(nb_pass*sizeof(md4_pass));
        pass_list=*p_pass_list;
 
-       if( memcmp(nt_password_hash,zeros,NTLMSSP_KEY_LEN) != 0 ) {
+       if( memcmp(nt_password_hash,gbl_zeros,NTLMSSP_KEY_LEN) != 0 ) {
                memcpy(pass_list[i].md4,nt_password_hash,NTLMSSP_KEY_LEN);
                i = 1;
        }
@@ -1465,8 +1465,8 @@ dissect_ntlmssp_challenge (tvbuff_t *tvb, packet_info *pinfo, int offset,
     if (!(conv_ntlmssp_info->flags & NTLMSSP_NEGOTIATE_EXTENDED_SECURITY))
     {
       conv_ntlmssp_info->rc4_state_initialized = 0;
-      create_ntlmssp_v1_key(nt_password, conv_ntlmssp_info->server_challenge,NULL, sspkey,NULL,conv_ntlmssp_info->flags,conv_ntlmssp_info->ntlm_response.contents,conv_ntlmssp_info->lm_response.contents);
-      if( memcmp(sspkey,zeros,NTLMSSP_KEY_LEN) != 0 ) {
+      create_ntlmssp_v1_key(gbl_nt_password, conv_ntlmssp_info->server_challenge,NULL, sspkey,NULL,conv_ntlmssp_info->flags,conv_ntlmssp_info->ntlm_response.contents,conv_ntlmssp_info->lm_response.contents);
+      if( memcmp(sspkey,gbl_zeros,NTLMSSP_KEY_LEN) != 0 ) {
         get_sealing_rc4key(sspkey,conv_ntlmssp_info->flags,&ssp_key_len,clientkey,serverkey);
         crypt_rc4_init(&conv_ntlmssp_info->rc4_state_client, sspkey, ssp_key_len);
         crypt_rc4_init(&conv_ntlmssp_info->rc4_state_server, sspkey, ssp_key_len);
@@ -1680,15 +1680,15 @@ dissect_ntlmssp_auth (tvbuff_t *tvb, packet_info *pinfo, int offset,
       {
         conv_ntlmssp_info->rc4_state_initialized = 0;
         if( conv_ntlmssp_info->is_auth_ntlm_v2 ) {
-          create_ntlmssp_v2_key(nt_password, conv_ntlmssp_info->server_challenge,conv_ntlmssp_info->client_challenge, sspkey,encryptedsessionkey,conv_ntlmssp_info->flags,conv_ntlmssp_info->ntlm_response,conv_ntlmssp_info->lm_response,ntlmssph);
+          create_ntlmssp_v2_key(gbl_nt_password, conv_ntlmssp_info->server_challenge,conv_ntlmssp_info->client_challenge, sspkey,encryptedsessionkey,conv_ntlmssp_info->flags,conv_ntlmssp_info->ntlm_response,conv_ntlmssp_info->lm_response,ntlmssph);
         }
         else
         {
           memcpy(conv_ntlmssp_info->client_challenge,conv_ntlmssp_info->lm_response.contents,8);
-          create_ntlmssp_v1_key(nt_password, conv_ntlmssp_info->server_challenge,conv_ntlmssp_info->client_challenge, sspkey,encryptedsessionkey,conv_ntlmssp_info->flags,conv_ntlmssp_info->ntlm_response.contents,conv_ntlmssp_info->lm_response.contents);
+          create_ntlmssp_v1_key(gbl_nt_password, conv_ntlmssp_info->server_challenge,conv_ntlmssp_info->client_challenge, sspkey,encryptedsessionkey,conv_ntlmssp_info->flags,conv_ntlmssp_info->ntlm_response.contents,conv_ntlmssp_info->lm_response.contents);
         }
         /* ssp is the exported session key */
-        if( memcmp(sspkey,zeros,NTLMSSP_KEY_LEN) != 0) {
+        if( memcmp(sspkey,gbl_zeros,NTLMSSP_KEY_LEN) != 0) {
           get_sealing_rc4key(sspkey,conv_ntlmssp_info->flags,&ssp_key_len,clientkey,serverkey);
           get_siging_key((guint8*)&conv_ntlmssp_info->sign_key_server,(guint8*)&conv_ntlmssp_info->sign_key_client,sspkey,ssp_key_len);
           crypt_rc4_init(&conv_ntlmssp_info->rc4_state_server, serverkey, ssp_key_len);
@@ -2702,7 +2702,7 @@ proto_register_ntlmssp(void)
   prefs_register_string_preference(ntlmssp_module, "nt_password",
                                   "NT Password",
                                   "NT Password (used to decrypt payloads)",
-                                  &nt_password);
+                                  &gbl_nt_password);
 
   register_dissector("ntlmssp", dissect_ntlmssp, proto_ntlmssp);
   new_register_dissector("ntlmssp_payload", dissect_ntlmssp_payload, proto_ntlmssp);
index 109d3bf97cb8461fcca81eba5d42e0f327e7c946..ae5d6ea288004c7315dceb5ac05f3e88a116ae52 100644 (file)
@@ -161,11 +161,11 @@ static const value_string nameservice_type_vals[] = {
 static gboolean global_olsr_olsrorg = TRUE;
 static gboolean global_olsr_nrlolsr = TRUE;
 
-static double getOlsrTime(guint8 time) {
+static double getOlsrTime(guint8 timeval) {
   int high_bits, low_bits;
 
-  high_bits = ((time & 0xF0) >> 4);
-  low_bits = (time & 0x0F);
+  high_bits = ((timeval & 0xF0) >> 4);
+  low_bits = (timeval & 0x0F);
   return ((1 << low_bits) / 16.0) * (1 + (high_bits / 16.0));
 }
 
index a4a99323afca9508be4930781d5967d964adb6c1..a2b5a09043d8a71fbff6940d96fbf93437941071 100644 (file)
@@ -688,7 +688,7 @@ static gint ospf_ls_type_to_filter (guint8 ls_type)
 typedef struct _bitfield_info {
     int         hfindex;
     gint        *ett;
-    int         *index;
+    int         *idx;
     int         num;
 } bitfield_info;
 
@@ -829,7 +829,7 @@ dissect_ospf_bitfield (proto_tree *parent_tree, tvbuff_t *tvb, int offset,
     gint length, pos;
     gint i;
     header_field_info *hfinfo;
-    int hfindex, index;
+    int hfindex, idx;
     gint returned_length;
 
     hfindex = hf_ospf_filter[bfinfo->hfindex];
@@ -862,15 +862,15 @@ dissect_ospf_bitfield (proto_tree *parent_tree, tvbuff_t *tvb, int offset,
        str = ep_alloc(MAX_OPTIONS_LEN);
        str[0] = 0;
        for (i = 0, pos = 0; i < bfinfo->num; i++) {
-            index = hf_ospf_filter[bfinfo->index[i]];
-           hfinfo = proto_registrar_get_nth(index);
+            idx = hf_ospf_filter[bfinfo->idx[i]];
+           hfinfo = proto_registrar_get_nth(idx);
            if (flags & hfinfo->bitmask) {
                returned_length = g_snprintf(&str[pos], MAX_OPTIONS_LEN-pos, "%s%s",
                                  pos ? ", " : "",
                                  hfinfo->name);
                pos += MIN(returned_length, MAX_OPTIONS_LEN-pos);
            }
-           proto_tree_add_boolean(tree, index, tvb, offset, length, flags);
+           proto_tree_add_boolean(tree, idx, tvb, offset, length, flags);
        }
        if (str[0]) {
            proto_item_append_text(item, " (%s)", str);
index 9c196c70fca807c1c85948c67e5e3922fdc87ce3..3db2400d49d1fec2ebc8b1ac040cce68027f2a76 100644 (file)
@@ -300,7 +300,7 @@ static int dissect_pbb_tlvblock(tvbuff_t *tvb, proto_tree *tree, guint offset,
 
 static int dissect_pbb_addressblock(tvbuff_t *tvb, proto_tree *tree, guint offset, guint maxoffset,
     guint8 addressType, guint8 addressSize) {
-  guint8 address[MAX_ADDR_SIZE];
+  guint8 addr[MAX_ADDR_SIZE];
 
   guint8 numAddr;
   guint8 address_flags;
@@ -326,7 +326,7 @@ static int dissect_pbb_addressblock(tvbuff_t *tvb, proto_tree *tree, guint offse
 
   DISSECTOR_ASSERT(addressSize <= MAX_ADDR_SIZE);
 
-  memset(address, 0, addressSize);
+  memset(addr, 0, addressSize);
 
   block_length = 2;
   block_index = offset;
@@ -355,7 +355,7 @@ static int dissect_pbb_addressblock(tvbuff_t *tvb, proto_tree *tree, guint offse
           tvb_get_ptr(tvb, offset, maxoffset - offset), "Not enough octets for addressblock head");
       return tvb_reported_length(tvb);
     }
-    tvb_memcpy(tvb, address, offset, head_length);
+    tvb_memcpy(tvb, addr, offset, head_length);
 
     midSize -= head_length;
     block_length += (head_length+1);
@@ -398,7 +398,7 @@ static int dissect_pbb_addressblock(tvbuff_t *tvb, proto_tree *tree, guint offse
           tvb_get_ptr(tvb, offset, maxoffset - offset), "Not enough octets for addressblock tail");
       return tvb_reported_length(tvb);
     }
-    tvb_memcpy(tvb, &address[addressSize - tail_length], offset, tail_length);
+    tvb_memcpy(tvb, &addr[addressSize - tail_length], offset, tail_length);
 
     midSize -= tail_length;
     block_length += (tail_length+1);
@@ -456,10 +456,10 @@ static int dissect_pbb_addressblock(tvbuff_t *tvb, proto_tree *tree, guint offse
     proto_tree_add_item(addr_tree, hf_packetbb_addr_head, tvb, tail_index, 1, FALSE);
   }
   for (i=0; i<numAddr; i++) {
-    guint32 ipv4 = (address[0] << 24) + (address[1] << 16) + (address[2] << 8) + address[3];
+    guint32 ipv4 = (addr[0] << 24) + (addr[1] << 16) + (addr[2] << 8) + addr[3];
     guint8 prefix = addressSize * 8;
 
-    tvb_memcpy(tvb, &address[head_length], mid_index + midSize*i, midSize);
+    tvb_memcpy(tvb, &addr[head_length], mid_index + midSize*i, midSize);
 
     switch (addressType) {
       case 0:
@@ -468,15 +468,15 @@ static int dissect_pbb_addressblock(tvbuff_t *tvb, proto_tree *tree, guint offse
         break;
       case 1:
         addrValue_item = proto_tree_add_ipv6(addr_tree, hf_packetbb_addr_value[addressType],
-            tvb, mid_index, block_index + block_length - mid_index, address);
+            tvb, mid_index, block_index + block_length - mid_index, addr);
         break;
       case 2:
         addrValue_item = proto_tree_add_ether(addr_tree, hf_packetbb_addr_value[addressType],
-            tvb, mid_index, block_index + block_length - mid_index, address);
+            tvb, mid_index, block_index + block_length - mid_index, addr);
         break;
       default:
         addrValue_item = proto_tree_add_bytes(addr_tree, hf_packetbb_addr_value[addressType],
-            tvb, mid_index, block_index + block_length - mid_index, address);
+            tvb, mid_index, block_index + block_length - mid_index, addr);
         break;
     }
     addrValue_tree = proto_item_add_subtree(addrValue_item, ett_packetbb_addr_value);
index 426620db9061702ccb56400cdf25d346188dd6c2..e3af00f2d0d7c3de3ee75300683ca552cbf9b66b 100644 (file)
@@ -188,14 +188,14 @@ tvbuff_t *new_octet_aligned_subset_bits(tvbuff_t *tvb, guint32 boffset, asn1_ctx
   guint16      word;
 
   guint32      new_length, check_length;
-  guint32      remainder, tvb_bits;
+  guint32      remainderval, tvb_bits;
 
   /* Calculate the size reqired */
 
   new_length = no_of_bits/8;
-  remainder = no_of_bits % 8;
+  remainderval = no_of_bits % 8;
   
-  if(remainder){
+  if(remainderval){
          new_length++;
   }else{
          /* Number of bits = even number of octets */
@@ -205,8 +205,8 @@ tvbuff_t *new_octet_aligned_subset_bits(tvbuff_t *tvb, guint32 boffset, asn1_ctx
   /* The bits can be contained in two "extra octets" .... .xxx [xxxx]*n xx... ....*/
   tvb_bits = (boffset & 7)+ no_of_bits;
   check_length = tvb_bits/8;
-  remainder = no_of_bits % 8;
-  if(remainder){
+  remainderval = no_of_bits % 8;
+  if(remainderval){
          check_length++;
   }
 
@@ -225,10 +225,10 @@ tvbuff_t *new_octet_aligned_subset_bits(tvbuff_t *tvb, guint32 boffset, asn1_ctx
     /* get the 'odd' bits */
     shift1 = offset & 0x07;
     word = tvb_get_ntohs(tvb, offset) & bit_mask16[offset & 0x07];
-    word = word >> (16-(shift1+remainder));
+    word = word >> (16-(shift1+remainderval));
     buf[0] = word & 0x00ff;
 
-    boffset = boffset + remainder;
+    boffset = boffset + remainderval;
     offset = boffset >> 3;
     if (new_length >1){
       shift1 = offset & 0x07;
@@ -262,7 +262,7 @@ tvbuff_t *new_octet_aligned_subset_bits(tvbuff_t *tvb, guint32 boffset, asn1_ctx
     }else{
       word = tvb_get_guint8(tvb,offset+i) << (shift1 + 8);
     }
-    word = word & bit_mask16_unalligned[remainder];
+    word = word & bit_mask16_unalligned[remainderval];
     word = word >> 8;
     buf[i] = (guint8) (word & 0x00ff);
   }
@@ -1562,23 +1562,23 @@ DEBUG_ENTRY("dissect_per_constrained_integer_64b");
                val_start = (offset>>3)-2; val_length = 2;
                val+=min;
        } else {
-               int i,num_bytes,num_bits;
+               int i,num_bytes,n_bits;
 
                /* 10.5.7.4 */
                /* 12.2.6 */
                /* calculate the number of bits to hold the length */
                if ((range & G_GINT64_CONSTANT(0xffffffff0000000)) != 0){
-                       num_bits=3;
+                       n_bits=3;
                }else{
-                       num_bits=2;
+                       n_bits=2;
                }
-               num_bytes =tvb_get_bits8(tvb, offset, num_bits);
+               num_bytes =tvb_get_bits8(tvb, offset, n_bits);
                num_bytes++;  /* lower bound for length determinant is 1 */
                if (display_internal_per_fields){
-                       int_item = proto_tree_add_bits_item(tree, hf_per_const_int_len, tvb, offset,num_bits, FALSE);
+                       int_item = proto_tree_add_bits_item(tree, hf_per_const_int_len, tvb, offset,n_bits, FALSE);
                        proto_item_append_text(int_item,"+1=%u bytes, Range = (%" G_GINT64_MODIFIER "u)",num_bytes, range);
                }
-               offset = offset+num_bits;
+               offset = offset+n_bits;
                /* byte aligned */
                BYTE_ALIGN_OFFSET(offset);
                val=0;
@@ -1684,7 +1684,7 @@ dissect_per_choice(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *
        int extension_root_entries;
        int extension_addition_entries;
        guint32 choice_index;
-       int i, index, cidx;
+       int i, idx, cidx;
        guint32 ext_length;
        guint32 old_offset = offset;
        proto_item *choice_item = NULL;
@@ -1729,10 +1729,10 @@ DEBUG_ENTRY("dissect_per_choice");
                        if (!display_internal_per_fields) PROTO_ITEM_SET_HIDDEN(actx->created_item);
                }
 
-               index = -1; cidx = choice_index;
+               idx = -1; cidx = choice_index;
                for (i=0; choice[i].p_id; i++) {
                        if(choice[i].extension != ASN1_NOT_EXTENSION_ROOT){
-                               if (!cidx) { index = i; break; }
+                               if (!cidx) { idx = i; break; }
                                cidx--;
                        }
                }
@@ -1740,22 +1740,22 @@ DEBUG_ENTRY("dissect_per_choice");
                offset = dissect_per_normally_small_nonnegative_whole_number(tvb, offset, actx, tree, hf_per_choice_extension_index, &choice_index);
                offset = dissect_per_length_determinant(tvb, offset, actx, tree, hf_per_open_type_length, &ext_length);
 
-               index = -1; cidx = choice_index;
+               idx = -1; cidx = choice_index;
                for (i=0; choice[i].p_id; i++) {
                        if(choice[i].extension == ASN1_NOT_EXTENSION_ROOT){
-                               if (!cidx) { index = i; break; }
+                               if (!cidx) { idx = i; break; }
                                cidx--;
                        }
                }
        }
 
-       if (index != -1) {
-               choice_item = proto_tree_add_uint(tree, hf_index, tvb, old_offset>>3, 0, choice[index].value);
+       if (idx != -1) {
+               choice_item = proto_tree_add_uint(tree, hf_index, tvb, old_offset>>3, 0, choice[idx].value);
                choice_tree = proto_item_add_subtree(choice_item, ett_index);
                if (!extension_flag) {
-                       offset = choice[index].func(tvb, offset, actx, choice_tree, *choice[index].p_id);
+                       offset = choice[idx].func(tvb, offset, actx, choice_tree, *choice[idx].p_id);
                } else {
-                       choice[index].func(tvb, offset, actx, choice_tree, *choice[index].p_id);
+                       choice[idx].func(tvb, offset, actx, choice_tree, *choice[idx].p_id);
                        offset += ext_length * 8;
                }
                proto_item_set_len(choice_item, BLEN(old_offset, offset));
@@ -1769,55 +1769,55 @@ DEBUG_ENTRY("dissect_per_choice");
                }
        }
 
-       if (value && (index != -1))
-               *value = choice[index].value;
+       if (value && (idx != -1))
+               *value = choice[idx].value;
 
        return offset;
 }
 
 
 static const char *
-index_get_optional_name(const per_sequence_t *sequence, int index)
+index_get_optional_name(const per_sequence_t *sequence, int idx)
 {
        int i;
        header_field_info *hfi;
 
        for(i=0;sequence[i].p_id;i++){
                if((sequence[i].extension!=ASN1_NOT_EXTENSION_ROOT)&&(sequence[i].optional==ASN1_OPTIONAL)){
-                       if (index == 0) {
+                       if (idx == 0) {
                                hfi = proto_registrar_get_nth(*sequence[i].p_id);
                                return (hfi) ? hfi->name : "<unknown filed>";
                        }
-                       index--;
+                       idx--;
                }
        }
        return "<unknown type>";
 }
 
 static const char *
-index_get_extension_name(const per_sequence_t *sequence, int index)
+index_get_extension_name(const per_sequence_t *sequence, int idx)
 {
        int i;
        header_field_info *hfi;
 
        for(i=0;sequence[i].p_id;i++){
                if(sequence[i].extension==ASN1_NOT_EXTENSION_ROOT){
-                       if (index == 0) {
+                       if (idx == 0) {
                                hfi = proto_registrar_get_nth(*sequence[i].p_id);
                                return (hfi) ? hfi->name : "<unknown filed>";
                        }
-                       index--;
+                       idx--;
                }
        }
        return "<unknown type>";
 }
 
 static const char *
-index_get_field_name(const per_sequence_t *sequence, int index)
+index_get_field_name(const per_sequence_t *sequence, int idx)
 {
        header_field_info *hfi;
 
-       hfi = proto_registrar_get_nth(*sequence[index].p_id);
+       hfi = proto_registrar_get_nth(*sequence[idx].p_id);
        return (hfi) ? hfi->name : "<unknown filed>";
 }
 
index c09dc511c279d5c10c8e885dd5207a623bdf04ae..fceeb54753f80624d0c12cebda6e9198a3273d47 100644 (file)
@@ -258,7 +258,7 @@ static const char *
 optsstr(guint8 opts)
 {
        char *msg;
-       gint  returned_length, index = 0;
+       gint  returned_length, idx = 0;
        const int MAX_STR_LEN = 256;
 
        if (opts == 0)
@@ -266,23 +266,23 @@ optsstr(guint8 opts)
 
        msg=ep_alloc(MAX_STR_LEN);
        if (opts & PGM_OPT){
-               returned_length = g_snprintf(&msg[index], MAX_STR_LEN-index, "Present");
-               index += MIN(returned_length, MAX_STR_LEN-index);
+               returned_length = g_snprintf(&msg[idx], MAX_STR_LEN-idx, "Present");
+               idx += MIN(returned_length, MAX_STR_LEN-idx);
        }
        if (opts & PGM_OPT_NETSIG){
-               returned_length = g_snprintf(&msg[index], MAX_STR_LEN-index, "%sNetSig", (!index)?"":",");
-               index += MIN(returned_length, MAX_STR_LEN-index);
+               returned_length = g_snprintf(&msg[idx], MAX_STR_LEN-idx, "%sNetSig", (!idx)?"":",");
+               idx += MIN(returned_length, MAX_STR_LEN-idx);
        }
        if (opts & PGM_OPT_VAR_PKTLEN){
-               returned_length = g_snprintf(&msg[index], MAX_STR_LEN-index, "%sVarLen", (!index)?"":",");
-               index += MIN(returned_length, MAX_STR_LEN-index);
+               returned_length = g_snprintf(&msg[idx], MAX_STR_LEN-idx, "%sVarLen", (!idx)?"":",");
+               idx += MIN(returned_length, MAX_STR_LEN-idx);
        }
        if (opts & PGM_OPT_PARITY){
-               returned_length = g_snprintf(&msg[index], MAX_STR_LEN-index, "%sParity", (!index)?"":",");
-               index += MIN(returned_length, MAX_STR_LEN-index);
+               returned_length = g_snprintf(&msg[idx], MAX_STR_LEN-idx, "%sParity", (!idx)?"":",");
+               idx += MIN(returned_length, MAX_STR_LEN-idx);
        }
-       if (!index) {
-               g_snprintf(&msg[index], MAX_STR_LEN-index, "0x%x", opts);
+       if (!idx) {
+               g_snprintf(&msg[idx], MAX_STR_LEN-idx, "0x%x", opts);
        }
        return(msg);
 }
@@ -290,7 +290,7 @@ static const char *
 paritystr(guint8 parity)
 {
        char *msg;
-       gint returned_length, index = 0;
+       gint returned_length, idx = 0;
        const int MAX_STR_LEN = 256;
 
        if (parity == 0)
@@ -298,15 +298,15 @@ paritystr(guint8 parity)
 
        msg=ep_alloc(MAX_STR_LEN);
        if (parity & PGM_OPT_PARITY_PRM_PRO){
-               returned_length = g_snprintf(&msg[index], MAX_STR_LEN-index, "Pro-active");
-               index += MIN(returned_length, MAX_STR_LEN-index);
+               returned_length = g_snprintf(&msg[idx], MAX_STR_LEN-idx, "Pro-active");
+               idx += MIN(returned_length, MAX_STR_LEN-idx);
        }
        if (parity & PGM_OPT_PARITY_PRM_OND){
-               returned_length = g_snprintf(&msg[index], MAX_STR_LEN-index, "%sOn-demand", (!index)?"":",");
-               index += MIN(returned_length, MAX_STR_LEN-index);
+               returned_length = g_snprintf(&msg[idx], MAX_STR_LEN-idx, "%sOn-demand", (!idx)?"":",");
+               idx += MIN(returned_length, MAX_STR_LEN-idx);
        }
-       if (!index) {
-               g_snprintf(&msg[index], MAX_STR_LEN-index, "0x%x", parity);
+       if (!idx) {
+               g_snprintf(&msg[idx], MAX_STR_LEN-idx, "0x%x", parity);
        }
        return(msg);
 }
index 926e68641cd3414bdf97d5264c2a81d51d339b23..5fcd6dc85c92dbbee6a2dbea54c084110793fc25 100644 (file)
@@ -116,7 +116,7 @@ static gboolean response_is_continuation(const guchar *data);
 static void
 dissect_pop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 {
-  struct pop_proto_data  *frame_data;
+  struct pop_proto_data  *frame_data_p;
   gboolean               is_request;
   gboolean               is_continuation;
   proto_tree             *pop_tree, *reqresp_tree;
@@ -153,9 +153,9 @@ dissect_pop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     is_continuation = response_is_continuation(line);
   }
 
-  frame_data = p_get_proto_data(pinfo->fd, proto_pop);
+  frame_data_p = p_get_proto_data(pinfo->fd, proto_pop);
 
-  if (!frame_data) {
+  if (!frame_data_p) {
 
     conversation = find_conversation(pinfo->fd->num, 
              &pinfo->src, &pinfo->dst, 
@@ -208,24 +208,24 @@ dissect_pop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
     if (pop_data_desegment) {
 
-      if (!frame_data) {
+      if (!frame_data_p) {
 
         data_val->msg_read_len += tvb_length(tvb);
 
-        frame_data = se_alloc(sizeof(struct pop_proto_data));
+        frame_data_p = se_alloc(sizeof(struct pop_proto_data));
 
-        frame_data->conversation_id = conversation->index;
-        frame_data->more_frags = data_val->msg_read_len < data_val->msg_tot_len;
+        frame_data_p->conversation_id = conversation->index;
+        frame_data_p->more_frags = data_val->msg_read_len < data_val->msg_tot_len;
 
-        p_add_proto_data(pinfo->fd, proto_pop, frame_data);  
+        p_add_proto_data(pinfo->fd, proto_pop, frame_data_p);  
       }
 
       frag_msg = fragment_add_seq_next(tvb, 0, pinfo, 
-                                       frame_data->conversation_id, 
+                                       frame_data_p->conversation_id, 
                                        pop_data_segment_table, 
                                        pop_data_reassembled_table, 
                                        tvb_length(tvb), 
-                                       frame_data->more_frags);
+                                       frame_data_p->more_frags);
 
       next_tvb = process_reassembled_data(tvb, offset, pinfo, 
                                           "Reassembled DATA",
index 21712f21f882ce3d7cec0eceb3aa2d5f08974ba0..6946e0a4eaa131e6179b3e1ab43fa0fd5f99b8e7 100644 (file)
@@ -136,7 +136,7 @@ static int
 dissect_getport_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
        proto_tree *tree)
 {
-       guint32 port;
+       guint32 portx;
 
        /* we might have learnt a <ipaddr><protocol><port> mapping for ONC-RPC*/
        if(!pinfo->fd->flags.visited){
@@ -156,15 +156,15 @@ dissect_getport_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
                }
        }
 
-       port = tvb_get_ntohl(tvb, offset);
+       portx = tvb_get_ntohl(tvb, offset);
        offset = dissect_rpc_uint32(tvb, tree, hf_portmap_port,
            offset);
-       proto_item_append_text(tree, " GETPORT Reply Port:%d", port);
-       if(port){
+       proto_item_append_text(tree, " GETPORT Reply Port:%d", portx);
+       if(portx){
                if (check_col(pinfo->cinfo, COL_INFO)) {
-                       col_append_fstr(pinfo->cinfo, COL_INFO,  " Port:%d", port);
+                       col_append_fstr(pinfo->cinfo, COL_INFO,  " Port:%d", portx);
                }
-               proto_item_append_text(tree, " Port:%d", port);
+               proto_item_append_text(tree, " Port:%d", portx);
        } else {
                col_append_str(pinfo->cinfo, COL_INFO,  " PROGRAM_NOT_AVAILABLE");
                proto_item_append_text(tree, " PROGRAM_NOT_AVAILABLE");
index d3982f9ba83777d84be30fd060ae16ff6787f5d2..d9dc85413ac08264625f066b75cef5ab77e85d0a 100644 (file)
@@ -2168,7 +2168,7 @@ static void
 dissect_ptp_v2_timeInterval(tvbuff_t *tvb, guint16 *cur_offset, proto_tree *tree, char* name, int hf_ptp_v2_timeInterval_ns, int hf_ptp_v2_timeInterval_subns)
 {
 
-       double time;
+       double time_double;
        gint64 time_ns;
        guint16 time_subns;
        proto_item      *ptptimeInterval_ti;
@@ -2184,16 +2184,16 @@ dissect_ptp_v2_timeInterval(tvbuff_t *tvb, guint16 *cur_offset, proto_tree *tree
                time_ns = time_ns | G_GINT64_CONSTANT(0xFFFFFFFFFF000000);
                time_ns = time_ns | tvb_get_ntohs(tvb, *cur_offset+4);
 
-               time = ((1.0*time_ns) + (time_subns/65536.0));
+               time_double = ((1.0*time_ns) + (time_subns/65536.0));
        }
        else
        {
                time_ns = time_ns | tvb_get_ntohs(tvb, *cur_offset+4);
-               time = time_ns + (time_subns/65536.0);
+               time_double = time_ns + (time_subns/65536.0);
        }
 
        ptptimeInterval_ti = proto_tree_add_text(tree, tvb, *cur_offset, 8,
-               "%s: %f nanoseconds", name, time);
+               "%s: %f nanoseconds", name, time_double);
 
        ptptimeInterval_subtree = proto_item_add_subtree(ptptimeInterval_ti, ett_ptp_v2_timeInterval);
 
index 05f65312bb5ed4ae514b3196a67f7af85fd89d07..fd1b109a96bfab4aa1631fa3a149a3276468d690 100644 (file)
@@ -102,10 +102,10 @@ void dissect_pw_padding(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
                item = proto_tree_add_item(tree, proto_pw_padding, tvb, 0, -1, FALSE);
                pwc_item_append_text_n_items(item,size,"byte");
                {
-                       proto_tree* tree;
-                       tree = proto_item_add_subtree(item, ett);
-                       call_dissector(dh_data, tvb, pinfo, tree);
-                       item = proto_tree_add_int(tree, hf_padding_len, tvb, 0, 0, size);
+                       proto_tree* tree_p;
+                       tree_p = proto_item_add_subtree(item, ett);
+                       call_dissector(dh_data, tvb, pinfo, tree_p);
+                       item = proto_tree_add_int(tree_p, hf_padding_len, tvb, 0, 0, size);
                        PROTO_ITEM_SET_HIDDEN(item); /*allow filtering*/
                }
        }
index 117a711bb59fc6370b99a92b02395f14c80b3808..4755de0695368ffd8dcf7f7c1b3623cdeb7e7b2d 100644 (file)
@@ -84,27 +84,27 @@ static void dissect_pw_hdlc_nocw_hdlc_ppp( tvbuff_t * tvb, packet_info * pinfo,
                proto_item  *item;
                proto_item  *item_address;
                proto_item  *item_control;
-               guint8      address;
+               guint8      addr;
                guint8      control;
 
-               address = tvb_get_guint8(tvb, 0);
+               addr    = tvb_get_guint8(tvb, 0);
                control = tvb_get_guint8(tvb, 1);
 
                item = proto_tree_add_item( tree, proto_pw_hdlc_nocw_hdlc_ppp, tvb, 0, 2, FALSE );
 
                tr = proto_item_add_subtree( item, ett_pw_hdlc );
 
-               item_address = proto_tree_add_uint( tr, hf_pw_hdlc_address_field, tvb, 0, 1, address );
+               item_address = proto_tree_add_uint( tr, hf_pw_hdlc_address_field, tvb, 0, 1, addr );
                item_control = proto_tree_add_uint_format( tr, hf_pw_hdlc_control_field, tvb, 1, 1, control, "Control field: 0x%x", control );
 
                tr = proto_item_add_subtree( item_address, ett_pw_hdlc );
 
-               if ( 0x3F == (( address & 0xFC ) >> 2 ))
+               if ( 0x3F == (( addr & 0xFC ) >> 2 ))
                        proto_tree_add_uint_format( tr, hf_pw_hdlc_address, tvb, 0, 1, 0xFC, "Address: 0x%x (All stations)", 0x3F );
                else
-                       proto_tree_add_uint( tr, hf_pw_hdlc_address, tvb, 0, 1, ( address & 0xFC ) >> 2 );
+                       proto_tree_add_uint( tr, hf_pw_hdlc_address, tvb, 0, 1, ( addr & 0xFC ) >> 2 );
 
-               proto_tree_add_uint( tr, hf_pw_hdlc_cr_bit, tvb, 0, 1, ( address & 2 ) >> 1 );
+               proto_tree_add_uint( tr, hf_pw_hdlc_cr_bit, tvb, 0, 1, ( addr & 2 ) >> 1 );
 
                tr = proto_item_add_subtree( item_control, ett_pw_hdlc );