There are now two remaining warnings.

Rainer Weikusat rainer.weikusat at sncag.com
Wed Sep 7 12:41:53 UTC 2005


Aurelien Jacobs <aurel at gnuage.org> writes:
> On Wed, 7 Sep 2005 02:09:29 -0500
> Rob Landley <rob at landley.net> wrote:
>
>> > /home/landley/busybox/busybox/networking/udhcp/options.c:160:
>> > warning: dereferencing type-punned pointer will break
>> > strict-aliasing rules 
>> 
>> This looks like an endianness problem to me.  (What's wrong with doing
>> this  through &mask |value the way everybody else does it?)
>
> I think it's more related to alignment of different pointer types.

There is no need to speculate here, because the message means exactly
what it says: As of C99, no objects of different types are allowed to
alias each other (sole exception is char), which means that the
compiler may assume that the value of 'aligned' does not change due to
indirect accesses (ie through pointers) except if the pointer is an
u32 * (or a char *).



More information about the busybox mailing list