Ethereal-dev: Re: [Ethereal-dev] MSVC warning: packet-per.c(332) : warning C4700: Lokale Varia

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

From: ronnie sahlberg <ronniesahlberg@xxxxxxxxx>
Date: Tue, 12 Oct 2004 18:24:07 +1000
yes   i think so.
the x691 standard is "unclear" in this regard so we just have to set
it to either/or and if we get it wrong we just wait until someone
complains.

i read x691 as that we actually only do the octet alignment IFF there
is actually some data to insert as a bit field to teh encoding.  
length==0  has no bitfield to append so i dont really know.



On Tue, 12 Oct 2004 01:07:41 -0700, Guy Harris <gharris@xxxxxxxxx> wrote:
> ronnie sahlberg wrote:
> 
> > the entire
> >   if(!length){
> >     /* there is no string at all, so dont do any byte alignment */
> >     byte_aligned=FALSE;
> >   }
> > should be moved down to just before the
> >   if(byte_aligned){
> >     if(offset&0x07){
> >       offset=(offset&0xfffffff8)+8;
> >     }
> >   }
> > block.
> 
> I.e., byte_aligned should be set to false even for unconstrained strings
> if the length determinant says it's zero-length?
>