On 23 Dec 2008, at 02:45, Nathan Vander Wilt <nate- li...@calftrail.com> wrote:

On Dec 22, 2008, at 4:42 AM, Gerriet M. Denkmann wrote:
When I use [GCC_WARN_UNUSED_PARAMETER, -Wunused-parameter]

I get (in Release build, not in Development) for every @synthesize
statement a warning:
warning: unused parameter '_value'
There is no "value" nor "_value" in the source to be found.

What am I doing wrong?

Xcode Version 3.1.1; gcc 4.0; 10.5.6

This was a bug in the compiler until gcc 4.2:
http://lists.apple.com/archives/objc-language/2008/jul/msg00043.html

If you're able change your compiler setting at this point in
development, that's the easiest fix.

4.2 seems to be working for me.
Are there any known issues with 4.2? Why is 4.2 not the GCC System Version?


Michael Ash" <michael....@gmail.com> wrote:

Sounds like the only thing you're doing "wrong" is using that warning.
I would file a bug and then turn it back off. (I gave up on
-Wunused-parameter long ago; Cocoa apps have far too many legitimately
unused parameters to make it worthwhile. That said, this is no excuse
for the compiler generating such warnings in its own code!)


I like this warning. So I just write:
- (IBAction)someButtonWasClicked: sender
{
        (void)sender;
Makes it clear to me that "sender" is not used in this method.

But yes, the first time I switched this flag on, I was rather overwhelmed by the number of warnings this generated.


Kind regards,

Gerriet.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to