On Sep 15, 2008, at 11:34 AM, Sean McBride wrote:

And gcc can catch these kinds of things!

$ gcc-4.2 -framework Cocoa -std=c99 -Wall -Wextra ~/Desktop/test.m

/Users/sean/Desktop/test.m: In function 'main':
/Users/sean/Desktop/test.m:7: warning: comparison of unsigned expression
= 0 is always true

Turn on those compiler warnings! :)

-Wall yes, but -Wextra can get pretty obnoxious. In my experience, that one tends to flood you with "unused parameter" warnings every time you have an IBAction that doesn't use the "sender" parameter, or you have a notification handler that doesn't use the notification object, or you implement some API that requires you to implement certain functions or methods that contain parameters you don't need, etc.

Charles
_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to