Wireshark-dev: Re: [Wireshark-dev] Alignment warnings - don't ignore them!
From: Jeff Morriss <jeff.morriss.ws@xxxxxxxxx>
Date: Thu, 08 Nov 2007 15:04:42 -0500


Guy Harris wrote:
morriss@xxxxxxxxxxxxx wrote:
http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=23401

User: morriss
Date: 2007/11/08 07:13 PM

Log:
 Don't cast pinfo->src.data to (const mtp3_addr_pc_t *) unless we *know* it's
 an MTP3 PC in there (else we get a bus error on SPARC systems).

Yup, SPARC processors don't support unaligned references, even though x86/x86-64, S/390 and z/Architecture, and PowerPC processors do. If GCC warns about a pointer type conversion from a type with one alignment requirement to a type with stricter alignment requirements, believe the warning.

I probably need a newer gcc because I'm not seeing any alignment warnings (well, at least not there). :-(