Re: Per-file Warnings suppression?
Re: Per-file Warnings suppression?
- Subject: Re: Per-file Warnings suppression?
- From: Chris Espinosa <email@hidden>
- Date: Wed, 1 Oct 2008 10:00:37 -0700
On Oct 1, 2008, at 6:56 AM, David Hoerl wrote: I use a xcconfig file for all my projects which includes:
GCC_WARN_SHADOW = YES
One set of header files I must include for one file uses "pi" within a structure, so I get this error every time I compile the file:
/usr/local/include/xxx/yyy:674: warning: declaration of 'pi' shadows a global declaration
I'd prefer to get a clean compile (since others see the output!), but I cannot find a way to suppress a warning for this flag (which translates to -Wshadow).
I understand I can remove the warning from the xcconfig file, and then add it to each of my other source files, but then I have to always remember to do this when I add a new file. [Plus, this is just a pita.]
The "Xcode Build System Guide", in "Per-File Compiler Flags", mentions this exactly "For example, ... whose warnings you want the compiler to ignore." but the example only shows a "-W..." addition.
[I tried +Wshadow, no good. Also looked at the GNU Manual, nothing of use found there either.]
Did I miss something?
Try adding -Wno-shadow to the per-file Build settings.
" Each of these specific warning options also has a negative form beginning `-Wno-' to turn off warnings; for example, -Wno-implicit."
Chris
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden