• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Refactoring tools was: Declarations near usage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Refactoring tools was: Declarations near usage


  • Subject: Re: Refactoring tools was: Declarations near usage
  • From: Keith Ray <email@hidden>
  • Date: Thu, 17 Oct 2002 16:36:02 -0700

On Wednesday, October 16, 2002, at 07:26 PM, tibbetts wrote:
[...]
> If this is your main concern, passing "-Wunused-variable" (or many
> other "-Wx"
> options; see
> http://gcc.gnu.org/onlinedocs/gcc-3.2/gcc/Warning-
> Options.html#Warning Options)
> to gcc (2.x and 3.x, and probably more) will alert you to this.
>
> For those who don't know how to do this, you can do this for each open
> project
> in Project Builder by selecting the Project->Edit Active Target...
> menu,
> selecting the "Build Settings" tab, and entering the compiler flags in
> the
> "Other Compiler Flags" field under "Compiler Settings".
>
I just tried this, and it isn't giving me a warning for an
uninitialized variable when I do a syntax check. This warning requires
compiling with -O (or some other -O setting.

I have to set the active build style to deployment (to enable compiling
with optimization) and then Build instead of Check Syntax to see this
warning.

Since I work on multiple platforms and compilers, the habit of
initializing variables serves me well when the compiler doesn't have
the option for this kind of warning.

--
C. Keith Ray
<http://homepage.mac.com/keithray/xpminifaq.html>
<http://homepage.mac.com/keithray/resume.html>
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Refactoring tools was: Declarations near usage (From: tibbetts <email@hidden>)

  • Prev by Date: Re: How to avoid a Windows interface on OS X?
  • Next by Date: Re: Refactoring tools was: Declarations near usage
  • Previous by thread: Re: Refactoring tools was: Declarations near usage
  • Next by thread: Re: Refactoring tools was: Declarations near usage
  • Index(es):
    • Date
    • Thread