[Drawkit] compiling b6
Graham Cox
graham.cox at bigpond.com
Thu Aug 27 18:16:11 PDT 2009
On 28/08/2009, at 3:08 AM, James Maxwell wrote:
> Just curious. I'm finally getting around to building beta 6, and I'm
> getting all sorts of warning about "_a" shadowing a previous local,
> when I try to build beta 6.
> Is this anything to worry about? Does it point to some other problem
> in my build directory, perhaps?
Hi James,
This is a nuisance - but no more than that. It's caused by the
implementation of the MIN and MAX macros. It's not unusual to nest
these to clip a value between an upper and a lower limit:
val = MAX(MIN(val, upper), lower)
unfortunately when you do this you end up with two local variables
called _a in the expansion of the macros (both MIN and MAX chose '-a'
whereas they could easily have used something different). It doesn't
stop them working properly when nested but it throws up this warning.
I should probably get around to filing a bug on this with Apple.
If it bugs you there is DK's own LIMIT macro which clips a value
between two limits without this warning. I've been gradually replacing
nested MIN/MAX calls with this.
--Graham
More information about the Drawkit
mailing list