Fix [-Wshadow] warning;
Also: - remove some uneeded variable initializers; - reformat some long lines; - do some whitespace and formatting changes to use a consistent style. svn path=/trunk/; revision=46272
This commit is contained in:
parent
f208489b56
commit
40a2218110
|
@ -2564,6 +2564,7 @@ dissect_PNIO_status(tvbuff_t *tvb, int offset,
|
|||
proto_tree *sub_tree;
|
||||
guint32 u32SubStart;
|
||||
int bytemask = (drep[0] & DREP_LITTLE_ENDIAN) ? 3 : 0;
|
||||
|
||||
const value_string *error_code1_vals;
|
||||
const value_string *error_code2_vals = pn_io_error_code2; /* defaults */
|
||||
|
||||
|
@ -5608,8 +5609,6 @@ dissect_PDIRBeginEndData_block(tvbuff_t *tvb, int offset,
|
|||
guint32 u32GreenPeriodBegin;
|
||||
guint16 u16TXPhaseAssignment;
|
||||
guint16 u16RXPhaseAssignment;
|
||||
proto_tree *ir_begin_end_port_tree = NULL;
|
||||
proto_item *ir_begin_end_port_sub_item = NULL;
|
||||
guint32 u32SubStart;
|
||||
guint32 u32Tmp;
|
||||
guint32 u32Tmp2;
|
||||
|
@ -5632,9 +5631,14 @@ dissect_PDIRBeginEndData_block(tvbuff_t *tvb, int offset,
|
|||
hf_pn_io_number_of_ports, &u32NumberOfPorts);
|
||||
u32Tmp2 = u32NumberOfPorts;
|
||||
while (u32Tmp2--) {
|
||||
proto_tree *ir_begin_end_port_tree;
|
||||
proto_item *ir_begin_end_port_sub_item;
|
||||
|
||||
/* new subtree for each Port */
|
||||
ir_begin_end_port_sub_item = proto_tree_add_item(tree, hf_pn_io_ir_begin_end_port, tvb, offset, 0, ENC_NA);
|
||||
ir_begin_end_port_tree = proto_item_add_subtree(ir_begin_end_port_sub_item, ett_pn_io_ir_begin_end_port);
|
||||
ir_begin_end_port_sub_item = proto_tree_add_item(tree, hf_pn_io_ir_begin_end_port,
|
||||
tvb, offset, 0, ENC_NA);
|
||||
ir_begin_end_port_tree = proto_item_add_subtree(ir_begin_end_port_sub_item,
|
||||
ett_pn_io_ir_begin_end_port);
|
||||
u32SubStart = offset;
|
||||
|
||||
offset = dissect_dcerpc_uint32(tvb, offset, pinfo, ir_begin_end_port_tree, drep,
|
||||
|
@ -8522,7 +8526,9 @@ dissect_ProfiSafeParameterRequest(tvbuff_t *tvb, int offset,
|
|||
offset = dissect_dcerpc_uint16(tvb, offset, pinfo, f_item, drep,
|
||||
hf_pn_io_profisafe_f_par_crc, &par_crc);
|
||||
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, ", F-Parameter record, prm_flag1:0x%02x, prm_flag2:0x%02x, src:0x%04x, dst:0x%04x, wd_time:%d, crc:0x%04x",
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO,
|
||||
", F-Parameter record, prm_flag1:0x%02x, prm_flag2:0x%02x, src:0x%04x,"
|
||||
" dst:0x%04x, wd_time:%d, crc:0x%04x",
|
||||
prm_flag1, prm_flag2, src_addr, dst_addr, wd_time, par_crc);
|
||||
|
||||
proto_item_append_text(f_item, "prm_flag1:0x%02x, prm_flag2:0x%02x, src:0x%04x, dst:0x%04x, wd_time:%d, crc:0x%04x",
|
||||
|
@ -8606,9 +8612,9 @@ dissect_IODWriteReq(tvbuff_t *tvb, int offset,
|
|||
offset = dissect_IODWriteReq(tvb, offset, pinfo, tree, drep, ar);
|
||||
}
|
||||
} else {
|
||||
tvbuff_t *tvb_new = tvb_new_subset(tvb, offset, u32RecDataLen, u32RecDataLen);
|
||||
tvbuff_t *new_tvb = tvb_new_subset(tvb, offset, u32RecDataLen, u32RecDataLen);
|
||||
/* RecordDataWrite */
|
||||
offset += dissect_RecordDataWrite(tvb_new, 0, pinfo, tree, drep, u16Index, u32RecDataLen);
|
||||
offset += dissect_RecordDataWrite(new_tvb, 0, pinfo, tree, drep, u16Index, u32RecDataLen);
|
||||
|
||||
/* Padding */
|
||||
switch (offset % 4) {
|
||||
|
@ -8694,8 +8700,8 @@ dissect_PNIO_IOxS(tvbuff_t *tvb, int offset,
|
|||
packet_info *pinfo _U_, proto_tree *tree, guint8 *drep _U_, int hfindex)
|
||||
{
|
||||
guint8 u8IOxS;
|
||||
proto_item *ioxs_item = NULL;
|
||||
proto_tree *ioxs_tree = NULL;
|
||||
proto_item *ioxs_item;
|
||||
proto_tree *ioxs_tree;
|
||||
|
||||
|
||||
u8IOxS = tvb_get_guint8(tvb, offset);
|
||||
|
|
Loading…
Reference in New Issue