Ethereal-dev: Re: [Ethereal-dev] New PROFINET dissector(s), first part checked in!

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

From: Guy Harris <gharris@xxxxxxxxx>
Date: Tue, 07 Dec 2004 10:15:50 -0800
Ulf Lamping wrote:

This includes the following PROFINET protocols:

- PN-RT: (RealTime protocol) base of other PROFINET protocols, using Ethernet type 0x8892

Some warnings:

	packet-pn-rt.c: In function `dissect_pn_rt':
	packet-pn-rt.c:325: warning: cast to pointer from integer of different size
packet-pn-rt.c:117: warning: `u8DataStatus' might be used uninitialized in this function packet-pn-rt.c:118: warning: `u8TransferStatus' might be used uninitialized in this function packet-pn-rt.c:119: warning: `u16CycleCounter' might be used uninitialized in this function

I'm not sure what you can do about the pointer cast; are the others variables that won't, in practice, be uninitialized, but GCC's dataflow analysis isn't sophisticated enough to discover that?

- PN-DCP: using PN-RT

It gets some warnings:

	packet-pn-dcp.c: In function `dissect_PNDCP_Block':
	packet-pn-dcp.c:701: warning: zero-length printf format string
	packet-pn-dcp.c: In function `dissect_PNDCP_Data_heur':
	packet-pn-dcp.c:847: warning: zero-length printf format string

If the idea is that it starts out empty and then gets stuff appended to it, you might want to restructure that so that it's not empty if the dissector throws an exception (due to a short packet) before anything gets appended to it.