I tried it on a number of platforms and seem to be ok. Your fix is now in CVS.
Please verify (the nightly build package will be available tomorrow).
Thanks!
Tinny
Kari Whitcomb wrote:
> I just wanted to bring this discussion back to the surface since it has been
> silent for a few days. I would really like to see this issue resolved as
> soon as possible. There has not been a real response to my suggestion of
> the following change. It eliminates the unaligned access warnings on TRU64
> but I do not know if it is appropriate for other platforms. Should I file a
> bug report, or is there someone willing to work with me to find a solution
> and submit the change to the code pool?
>
> Thanks
> Kari
>
> ----- Original Message -----
> From: "Kari Whitcomb" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, August 02, 2001 10:41 AM
> Subject: Re: Unaligned Access warnings in IDOM samples
>
> > Instead of padding the size that we want to allocate before calling the
> > allocate function, perhaps this should happen within
> > IDDocumentImpl::allocate(). Maybe something like the following? I don't
> > know if this will still cause the compiler errors reported yesterday with
> > g++ 2.95.4. Could someone try it out?
> > Thanks,
> > Kari
> >
> > *** IDDocumentImpl.cpp Wed Aug 1 15:19:13 2001
> > --- xml/xerces-c-src1_5_1/src/idom/IDDocumentImpl.cpp Thu Aug 2
> 10:43:07
> > 2001
> > ***************
> > *** 858,863 ****
> > --- 858,867 ----
> >
> > void * IDDocumentImpl::allocate(size_t amount)
> > {
> > + size_t sizeOfPointer = sizeof(void *);
> > + if (amount%sizeOfPointer!=0)
> > + amount = amount + (sizeOfPointer - (amount % sizeOfPointer));
> > +
> > // If the request is for a largish block, hand it off to the system
> > // allocator. The block still must be linked into the list of
> > // allocated blocks so that it will be deleted when the time
> comes.
> > ***************
> > *** 884,890 ****
> > fFreePtr = 0;
> > fFreeBytesRemaining = 0;
> > }
> > ! void *retPtr = (char *)newBlock + 4;
> > return retPtr;
> > }
> >
> > --- 888,894 ----
> > fFreePtr = 0;
> > fFreeBytesRemaining = 0;
> > }
> > ! void *retPtr = (char *)newBlock + sizeOfPointer;
> > return retPtr;
> > }
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]