Re: Showing more warnings possible in Xcode?
Re: Showing more warnings possible in Xcode?
- Subject: Re: Showing more warnings possible in Xcode?
- From: George Warner <email@hidden>
- Date: Sat, 30 May 2009 13:24:07 -0700
On Sat, 30 May 2009 13:22:08 +1000, Graham Cox
<email@hidden> wrote:
> On 30/05/2009, at 1:13 PM, Eric Hermanson wrote:
> Is there a way to tune xCode so that it warns you of these types of
> potential problems (and more)? The Java development environment
> I've been using for the past several years (Jetbrains IDEA) has
> unbelievably fantastic code-editing and compile-time warning systems
> that allow you to show a myriad of situations as warnings (some are
> user definable). Is there a way to do this in xCode, or at least
> set some flags to get more verbose warnings (especially those that
> can prevent "dumb" mistakes)?
> In your project's build settings, scroll down to "Other Warning
> Flags", and paste this lot in:
> -Wall -Wcast-align -Wchar-subscripts -Wextra -Wextra-tokens -
Wformat=2
> -Wmissing-field-initializers -Wpointer-arith -Wshadow -Wswitch-
default
> -Wundef -Wwrite-strings
In addition to the above I also like to include:
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES
GCC_WARN_ABOUT_RETURN_TYPE = YES
GCC_WARN_CHECK_SWITCH_STATEMENTS = YES
GCC_WARN_EFFECTIVE_CPLUSPLUS_VIOLATIONS = NO
GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES
GCC_WARN_MISSING_PARENTHESES = YES
GCC_WARN_PEDANTIC = NO
GCC_WARN_SHADOW = NO
GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES
GCC_WARN_UNINITIALIZED_AUTOS = NO
GCC_WARN_UNKNOWN_PRAGMAS = YES
GCC_WARN_UNUSED_FUNCTION = YES
GCC_WARN_UNUSED_LABEL = YES
GCC_WARN_UNUSED_PARAMETER = YES
GCC_WARN_UNUSED_VALUE = YES
GCC_WARN_UNUSED_VARIABLE = YES
(These paste into the project/target build settings pane)
--
Enjoy,
George Warner,
Schizophrenic Optimization Scientist
Apple Developer Technical Support (DTS)
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden