Ethereal-dev: Re: [Ethereal-dev] Additional commands dissected in SCSI

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Mon, 27 Oct 2003 14:03:15 -0800

On Oct 27, 2003, at 12:52 PM, Dinesh G Dutt wrote:

VC6++ didn't show these errors. Sorry.

VC++ doesn't give all the warnings that various versions of GCC do (and vice versa).

Guy Harris writes:
	packet-scsi.c:3145: warning: unused parameter `isreq'
	packet-scsi.c: In function `dissect_scsi_senddiag()':
	packet-scsi.c:3437: warning: unused parameter `iscdb'
	packet-scsi.c: In function `dissect_scsi_writebuffer':
	packet-scsi.c:3460: warning: unused parameter `iscdb'

Do the routines in question need to check the arguments in question?
No, they really don't. But I wanted to keep all the dissection routines have the same set of parameters so that I could replace the long list of "case" statements with a jump table later on as Ronnie Sahlberg suggested when I first
submitted the code.

So "dissect_scsi_startstopunit()" doesn't need to check its "isreq" argument, even though it might not always be passed the same value?