From: Gregory P. <gre...@gm...> - 2011-09-26 07:34:07
|
On Sat, Sep 17, 2011 at 02:52:30PM +0200, Johannes Weißl wrote: > Hi Mirko, > > On Sun, Sep 11, 2011 at 03:17:30PM +0200, Mirko Augsburger wrote: > > I just compiled the pu branch on my debian ARM system and got the > > warning several times. I don't know what is means but cmus is running > > fine, great work! :) > > Thanks :-)! I tried to fix those warnings several months ago, but I > couldn't find a fast and 100% standard compliant way to do it. > I tried replacing most of them with union casts, but it wasn't perfectly > standard compliant. It got rid of all the warnings though. You can try > it here: > https://gitorious.org/~jmuc/cmus/jw-cmus/commits/align > > If there is a C guru here, I would love to hear his/hers thoughts about > this! I tried fixind those some time ago, too. It was not a 100% success (I tried to avoid casting that generates the warnings — use int16[] instead of int8[] etc.), and the code is on the dead laptop now. I am not sure what is the proper way to deal with the issue. Unions make code look a bit ugly IMO. Maybe we should just live it as-is, for now. P.S. It is interesting how Linux kernel deals with it. Maybe they just disable this warning? If so, it looks like the way to go :-) Gregory |