From b19abb84bdb88c782a43b5cc1bd893433997efb9 Mon Sep 17 00:00:00 2001 From: wmeier Date: Mon, 18 Jul 2011 15:52:16 +0000 Subject: Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38085 f5534014-38df-0310-8fa8-9805f1628bb7 --- epan/dissectors/packet-scsi.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'epan/dissectors/packet-scsi.c') diff --git a/epan/dissectors/packet-scsi.c b/epan/dissectors/packet-scsi.c index fbd3ea78fe..de947ecc03 100644 --- a/epan/dissectors/packet-scsi.c +++ b/epan/dissectors/packet-scsi.c @@ -30,12 +30,12 @@ /* * Some Notes on using the SCSI Decoder: * - * The SCSI decoder has been built right now that it is invoked directly by the + * The SCSI decoder has been built right now so that it is invoked directly by the * SCSI transport layers as compared to the standard mechanism of being invoked * via a dissector chain. There are multiple reasons for this: * - The SCSI CDB is typically embedded inside the transport along with other * header fields that have nothing to do with SCSI. So, it is required to be - + * done this way. * - Originally, Wireshark couldn't do filtering on protocol trees that were not * on the top level. * @@ -4621,16 +4621,18 @@ static scsi_cdb_table_t spc[256] = { }; -/* This function must be called with walid pointers for both itlq and itl */ +/* This function must be called with valid pointers for both itlq and itl */ void dissect_scsi_cdb (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, - gint devtype_arg, itlq_nexus_t *itlq, itl_nexus_t *itl) + gint devtype_arg _U_, itlq_nexus_t *itlq, itl_nexus_t *itl) { int offset = 0; proto_item *ti; proto_tree *scsi_tree = NULL; guint8 opcode; +#if 0 scsi_device_type devtype; +#endif const gchar *valstr; scsi_task_data_t *cdata; const char *old_proto; @@ -4651,6 +4653,7 @@ dissect_scsi_cdb (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, itlq->scsi_opcode=opcode; csdata=get_cmdset_data(itlq, itl); +#if 0 /* XXX: devtype never actually used ?? */ if (devtype_arg != SCSI_DEV_UNKNOWN) { devtype = devtype_arg; } else { @@ -4660,6 +4663,7 @@ dissect_scsi_cdb (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, devtype = (scsi_device_type)scsi_def_devtype; } } +#endif if ((valstr = match_strval (opcode, scsi_spc_vals)) == NULL) { valstr = match_strval(opcode, csdata->cdb_vals); @@ -4737,7 +4741,6 @@ dissect_scsi_payload (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *ti; proto_tree *scsi_tree = NULL; guint8 opcode; - scsi_device_type devtype; scsi_task_data_t *cdata; int payload_len; const char *old_proto; @@ -4768,7 +4771,6 @@ dissect_scsi_payload (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pinfo->current_proto="SCSI"; opcode = (guint8) cdata->itlq->scsi_opcode; - devtype = cdata->itl->cmdset&SCSI_CMDSET_MASK; if (tree) { ti = proto_tree_add_protocol_format (tree, proto_scsi, tvb, offset, -- cgit v1.2.3