forked from osmocom/wireshark
Fix some gcc -Wshadow warnings.
svn path=/trunk/; revision=31724
This commit is contained in:
parent
bb79476b22
commit
c033a08313
|
@ -6992,7 +6992,7 @@ dissect_ProfiDriveParameterRequest(tvbuff_t *tvb, int offset,
|
|||
guint8 attribute;
|
||||
guint8 no_of_elems;
|
||||
guint16 parameter;
|
||||
guint16 index;
|
||||
guint16 idx;
|
||||
proto_item *sub_item;
|
||||
proto_tree *sub_tree;
|
||||
|
||||
|
@ -7007,17 +7007,17 @@ dissect_ProfiDriveParameterRequest(tvbuff_t *tvb, int offset,
|
|||
offset = dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
|
||||
hf_pn_io_profidrive_param_number, ¶meter);
|
||||
offset = dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree, drep,
|
||||
hf_pn_io_profidrive_param_subindex, &index);
|
||||
hf_pn_io_profidrive_param_subindex, &idx);
|
||||
|
||||
proto_item_append_text(sub_item, "Attr:%s, Elems:%u, Parameter:%u, Index:%u",
|
||||
val_to_str(attribute, pn_io_profidrive_attribute_vals, "Unknown"), no_of_elems,
|
||||
parameter, index);
|
||||
parameter, idx);
|
||||
|
||||
if(no_of_elems>1) {
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, ", P%d[%d..%d]", parameter, index, index+no_of_elems-1);
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, ", P%d[%d..%d]", parameter, idx, idx+no_of_elems-1);
|
||||
}
|
||||
else {
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, ", P%d[%d]", parameter, index);
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, ", P%d[%d]", parameter, idx);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -114,16 +114,16 @@ static void dsts_stats_tree_init(stats_tree* st) {
|
|||
static int dsts_stats_tree_packet(stats_tree* st, packet_info* pinfo, epan_dissect_t *edt _U_, const void *p _U_) {
|
||||
static gchar str[128];
|
||||
int ip_dst_node;
|
||||
int proto_node;
|
||||
int protocol_node;
|
||||
|
||||
tick_stat_node(st, st_str_dsts, 0, FALSE);
|
||||
|
||||
ip_dst_node = tick_stat_node(st, ep_address_to_str(&pinfo->net_src), st_node_dsts, TRUE);
|
||||
|
||||
proto_node = tick_stat_node(st,port_type_to_str(pinfo->ptype),ip_dst_node,TRUE);
|
||||
protocol_node = tick_stat_node(st,port_type_to_str(pinfo->ptype),ip_dst_node,TRUE);
|
||||
|
||||
g_snprintf(str, sizeof(str),"%u",pinfo->destport);
|
||||
tick_stat_node(st,str,proto_node,TRUE);
|
||||
tick_stat_node(st,str,protocol_node,TRUE);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -271,7 +271,7 @@ static gint hf_mac_header_compress_dlmap_crc = -1;
|
|||
* DL-MAP Miscellaneous IEs and TLVs
|
||||
*******************************************************************/
|
||||
|
||||
gint RCID_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb, gint RCID_Type)
|
||||
gint RCID_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint length, tvbuff_t *tvb, gint RCID_Type_lcl)
|
||||
{
|
||||
/* RCID_IE 8.4.5.3 and 8.4.5.3.20.1 */
|
||||
/* offset of IE in bits, length is variable */
|
||||
|
@ -281,20 +281,20 @@ gint RCID_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint leng
|
|||
gint Prefix = 0;
|
||||
gint cid = 0;
|
||||
|
||||
if (RCID_Type == 0)
|
||||
if (RCID_Type_lcl == 0)
|
||||
length = 16;
|
||||
else {
|
||||
Prefix = BIT_BIT(bit, bufptr);
|
||||
if (Prefix == 1) length = 12;
|
||||
else if (RCID_Type == 1) length = 12;
|
||||
else if (RCID_Type == 2) length = 8;
|
||||
else if (RCID_Type == 3) length = 4;
|
||||
else if (RCID_Type_lcl == 1) length = 12;
|
||||
else if (RCID_Type_lcl == 2) length = 8;
|
||||
else if (RCID_Type_lcl == 3) length = 4;
|
||||
}
|
||||
|
||||
ti = proto_tree_add_text(diuc_tree, tvb, BITHI(bit, length), "RCID_IE");
|
||||
tree = proto_item_add_subtree(ti, ett_286j);
|
||||
|
||||
if (RCID_Type == 0) {
|
||||
if (RCID_Type_lcl == 0) {
|
||||
XBIT(cid, 16, "CID");
|
||||
} else {
|
||||
proto_tree_add_text(tree, tvb, BITHI(bit,1), "Prefix: %d", Prefix);
|
||||
|
@ -304,13 +304,13 @@ gint RCID_IE(proto_tree *diuc_tree, const guint8 *bufptr, gint offset, gint leng
|
|||
/* RCID 11 */
|
||||
XBIT(cid, 11, "CID11");
|
||||
} else {
|
||||
if (RCID_Type == 1) {
|
||||
if (RCID_Type_lcl == 1) {
|
||||
/* RCID 11 */
|
||||
XBIT(cid, 11, "CID11");
|
||||
} else if (RCID_Type == 2) {
|
||||
} else if (RCID_Type_lcl == 2) {
|
||||
/* RCID 7 */
|
||||
XBIT(cid, 7, "CID7");
|
||||
} else if (RCID_Type == 3) {
|
||||
} else if (RCID_Type_lcl == 3) {
|
||||
/* RCID 3 */
|
||||
XBIT(cid, 3, "CID3");
|
||||
}
|
||||
|
|
|
@ -582,7 +582,6 @@ static void wimaxasncp_dissect_tlv_value(
|
|||
guint length;
|
||||
const guint max_show_bytes = 24; /* arbitrary */
|
||||
const gchar *hex_note = "[hex]";
|
||||
const gchar *s;
|
||||
|
||||
length = tvb_reported_length(tvb);
|
||||
|
||||
|
@ -608,6 +607,7 @@ static void wimaxasncp_dissect_tlv_value(
|
|||
if (tree)
|
||||
{
|
||||
guint8 value;
|
||||
const gchar *s;
|
||||
|
||||
value = tvb_get_guint8(tvb, offset);
|
||||
|
||||
|
@ -643,6 +643,7 @@ static void wimaxasncp_dissect_tlv_value(
|
|||
if (tree)
|
||||
{
|
||||
guint16 value;
|
||||
const gchar *s;
|
||||
|
||||
value = tvb_get_ntohs(tvb, offset);
|
||||
|
||||
|
@ -678,6 +679,7 @@ static void wimaxasncp_dissect_tlv_value(
|
|||
if (tree)
|
||||
{
|
||||
guint32 value;
|
||||
const gchar *s;
|
||||
|
||||
value = tvb_get_ntohl(tvb, offset);
|
||||
|
||||
|
@ -781,6 +783,8 @@ static void wimaxasncp_dissect_tlv_value(
|
|||
|
||||
if (value & mask)
|
||||
{
|
||||
const gchar *s;
|
||||
|
||||
s = wimaxasncp_get_enum_name(tlv_info, value & mask);
|
||||
|
||||
proto_tree_add_uint_format(
|
||||
|
@ -836,6 +840,7 @@ static void wimaxasncp_dissect_tlv_value(
|
|||
|
||||
if (value & mask)
|
||||
{
|
||||
const gchar *s;
|
||||
s = wimaxasncp_get_enum_name(tlv_info, value & mask);
|
||||
|
||||
proto_tree_add_uint_format(
|
||||
|
@ -2056,7 +2061,6 @@ dissect_wimaxasncp(
|
|||
if (tree)
|
||||
{
|
||||
proto_tree *flags_tree;
|
||||
guint i;
|
||||
|
||||
if (ui8 == 0)
|
||||
{
|
||||
|
@ -2067,6 +2071,7 @@ dissect_wimaxasncp(
|
|||
}
|
||||
else
|
||||
{
|
||||
guint j;
|
||||
item = proto_tree_add_uint_format(
|
||||
wimaxasncp_tree, hf_wimaxasncp_flags,
|
||||
tvb, offset, 1, ui8,
|
||||
|
@ -2093,10 +2098,10 @@ dissect_wimaxasncp(
|
|||
flags_tree = proto_item_add_subtree(
|
||||
item, ett_wimaxasncp_flags);
|
||||
|
||||
for (i = 0; i < 8; ++i)
|
||||
for (j = 0; j < 8; ++j)
|
||||
{
|
||||
guint8 mask;
|
||||
mask = 1 << (7 - i);
|
||||
mask = 1 << (7 - j);
|
||||
|
||||
/* Only add flags that are set */
|
||||
if (ui8 & mask)
|
||||
|
@ -2105,7 +2110,7 @@ dissect_wimaxasncp(
|
|||
flags_tree, hf_wimaxasncp_flags,
|
||||
tvb, offset, 1, ui8,
|
||||
"Bit #%u is set: %s",
|
||||
i,
|
||||
j,
|
||||
val_to_str(
|
||||
ui8 & mask, wimaxasncp_flag_vals, "Unknown"));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue