aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2010-01-28 21:49:30 +0000
committerBill Meier <wmeier@newsguy.com>2010-01-28 21:49:30 +0000
commit1341fcd87eed8a937e0362eac5cd3bc4d3a1180b (patch)
treefbe6ba74b37d4f018150d24eb22bd7d82714d4e6
parent2ea1e1962f0d55e2f22c474df50f1fe609c734ca (diff)
Fix some gcc -Wshadow warnings.
svn path=/trunk/; revision=31722
-rw-r--r--plugins/gryphon/packet-gryphon.c4
-rw-r--r--plugins/irda/packet-sir.c3
-rw-r--r--plugins/mate/mate_runtime.c10
-rw-r--r--plugins/mate/mate_util.c32
-rw-r--r--plugins/opcua/opcua_simpletypes.c6
5 files changed, 27 insertions, 28 deletions
diff --git a/plugins/gryphon/packet-gryphon.c b/plugins/gryphon/packet-gryphon.c
index fc9975e79b..a172aae682 100644
--- a/plugins/gryphon/packet-gryphon.c
+++ b/plugins/gryphon/packet-gryphon.c
@@ -418,7 +418,7 @@ static const val_str_dsp cmds[] = {
{-1, "- unknown -", NULL, NULL},
};
-static const value_string responses[] = {
+static const value_string responses_vs[] = {
{RESP_OK, "OK - no error"},
{RESP_UNKNOWN_ERR, "Unknown error"},
{RESP_UNKNOWN_CMD, "Unrecognised command"},
@@ -708,7 +708,7 @@ decode_response(tvbuff_t *tvb, int offset, int src, proto_tree *pt)
resp = tvb_get_ntohl (tvb, offset);
proto_tree_add_text (pt, tvb, offset, 4, "Status: %s",
- val_to_str(resp, responses, "Unknown (0x%08x)"));
+ val_to_str(resp, responses_vs, "Unknown (0x%08x)"));
offset += 4;
msglen -= 4;
diff --git a/plugins/irda/packet-sir.c b/plugins/irda/packet-sir.c
index 26541d6287..54f844e906 100644
--- a/plugins/irda/packet-sir.c
+++ b/plugins/irda/packet-sir.c
@@ -146,9 +146,8 @@ dissect_sir(tvbuff_t *tvb, packet_info *pinfo, proto_tree *root)
} else {
guint preamble_len = bof_offset - offset;
gint data_offset = bof_offset + 1;
- guint data_len = eof_offset - data_offset;
tvbuff_t* next_tvb = tvb_new_subset(tvb,
- data_offset, data_len, -1);
+ data_offset, eof_offset - data_offset, -1);
next_tvb = unescape_data(next_tvb, pinfo);
if (root) {
unsigned data_len = tvb_length(next_tvb) < 2 ? 0 :
diff --git a/plugins/mate/mate_runtime.c b/plugins/mate/mate_runtime.c
index 6d5684dec6..fa9209015d 100644
--- a/plugins/mate/mate_runtime.c
+++ b/plugins/mate/mate_runtime.c
@@ -484,7 +484,7 @@ static void analize_pdu(mate_pdu* pdu) {
AVPL* curr_gogkey = NULL;
void* cookie = NULL;
AVPL* gogkey_match = NULL;
- gchar* gogkey = NULL;
+ gchar* gogkey_str = NULL;
dbg_print (dbg_gop,1,dbg_facility,"analize_pdu: %s",pdu->cfg->name);
@@ -559,17 +559,17 @@ static void analize_pdu(mate_pdu* pdu) {
while (( curr_gogkey = get_next_avpl(gog_keys,&cookie) )) {
if (( gogkey_match = new_avpl_exact_match(cfg->name,gopkey_match,curr_gogkey,FALSE) )) {
- gogkey = avpl_to_str(gogkey_match);
+ gogkey_str = avpl_to_str(gogkey_match);
- if (g_hash_table_lookup(cfg->gog_index,gogkey)) {
+ if (g_hash_table_lookup(cfg->gog_index,gogkey_str)) {
gop = new_gop(cfg,pdu,gop_key);
g_hash_table_insert(cfg->gop_index,gop_key,gop);
delete_avpl(gogkey_match,FALSE);
- g_free(gogkey);
+ g_free(gogkey_str);
break;
} else {
delete_avpl(gogkey_match,FALSE);
- g_free(gogkey);
+ g_free(gogkey_str);
}
}
}
diff --git a/plugins/mate/mate_util.c b/plugins/mate/mate_util.c
index 3a6ce69878..f672c48eab 100644
--- a/plugins/mate/mate_util.c
+++ b/plugins/mate/mate_util.c
@@ -448,20 +448,20 @@ extern AVP* avp_copy(AVP* from) {
*
**/
extern AVPL* new_avpl(const gchar* name) {
- AVPL* new_avpl = g_mem_chunk_alloc(avp_chunk);
+ AVPL* new_avpl_p = g_mem_chunk_alloc(avp_chunk);
#ifdef _AVP_DEBUGGING
- dbg_print(dbg_avpl_op,7,dbg_fp,"new_avpl: %X name=%s",new_avpl,name);
+ dbg_print(dbg_avpl_op,7,dbg_fp,"new_avpl_p: %X name=%s",new_avpl_p,name);
#endif
- new_avpl->name = name ? scs_subscribe(avp_strings, name) : scs_subscribe(avp_strings, "");
- new_avpl->len = 0;
- new_avpl->null.avp = NULL;
- new_avpl->null.next = &new_avpl->null;
- new_avpl->null.prev = &new_avpl->null;
+ new_avpl_p->name = name ? scs_subscribe(avp_strings, name) : scs_subscribe(avp_strings, "");
+ new_avpl_p->len = 0;
+ new_avpl_p->null.avp = NULL;
+ new_avpl_p->null.next = &new_avpl_p->null;
+ new_avpl_p->null.prev = &new_avpl_p->null;
- return new_avpl;
+ return new_avpl_p;
}
extern void rename_avpl(AVPL* avpl, gchar* name) {
@@ -1383,22 +1383,22 @@ extern void avpl_transform(AVPL* src, AVPL_Transf* op) {
* Return value: a pointer to the newly created loal.
**/
extern LoAL* new_loal(const gchar* name) {
- LoAL* new_loal = g_mem_chunk_alloc(avp_chunk);
+ LoAL* new_loal_p = g_mem_chunk_alloc(avp_chunk);
if (! name) {
name = "anonymous";
}
#ifdef _AVP_DEBUGGING
- dbg_print(dbg_avpl_op,3,dbg_fp,"new_loal: %X name=%s",new_loal,name);
+ dbg_print(dbg_avpl_op,3,dbg_fp,"new_loal_p: %X name=%s",new_loal_p,name);
#endif
- new_loal->name = scs_subscribe(avp_strings,name);
- new_loal->null.avpl = NULL;
- new_loal->null.next = &new_loal->null;
- new_loal->null.prev = &new_loal->null;
- new_loal->len = 0;
- return new_loal;
+ new_loal_p->name = scs_subscribe(avp_strings,name);
+ new_loal_p->null.avpl = NULL;
+ new_loal_p->null.next = &new_loal_p->null;
+ new_loal_p->null.prev = &new_loal_p->null;
+ new_loal_p->len = 0;
+ return new_loal_p;
}
/**
diff --git a/plugins/opcua/opcua_simpletypes.c b/plugins/opcua/opcua_simpletypes.c
index 55406e624e..86d353be7a 100644
--- a/plugins/opcua/opcua_simpletypes.c
+++ b/plugins/opcua/opcua_simpletypes.c
@@ -633,15 +633,15 @@ void parseVariant(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, char *szFieldN
if (EncodingMask & VARIANT_ARRAYDIMENSIONS)
{
- proto_item *ti = proto_tree_add_text(tree, tvb, 0, -1, "Array Dimensions");
- proto_tree *subtree = proto_item_add_subtree(ti, ett_opcua_array);
+ proto_item *ti_2 = proto_tree_add_text(tree, tvb, 0, -1, "Array Dimensions");
+ proto_tree *subtree_2 = proto_item_add_subtree(ti_2, ett_opcua_array);
int i;
if (ArrayLength < MAX_ARRAY_LEN)
{
for (i=0; i<ArrayLength; i++)
{
- parseInt32(subtree, tvb, pOffset, hf_opcua_Int32);
+ parseInt32(subtree_2, tvb, pOffset, hf_opcua_Int32);
}
}
else