• 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: Warning: Possible Unwanted Assignment
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Warning: Possible Unwanted Assignment


  • Subject: Re: Warning: Possible Unwanted Assignment
  • From: Jim Ingham <email@hidden>
  • Date: Fri, 4 Nov 2005 17:40:15 -0800

You want "Missing braces and parentheses" (or as a gcc command line flag -Wparentheses).

Open the Target editor, go to Build, select Warnings under the GNU C/C ++ Compiler in the Collection pulldown. That will show you all of them. Use the little quick-type entry to find the braces... Check to turn it on.

Jim

On Nov 4, 2005, at 5:21 PM, Jerry Krinock wrote:

It seems, from searching docs and archives, there is no way to turn on/off
individual warnings in Xcode.


One of my common mistakes is this unwanted assignment:

if (index = 5) {

Wherein what I meant was

if (index == 5) {

Is there any way to make Xcode warn me about that, or is this a feature
request?


Jerry Krinock

Note: Yes, this is another "CodeWarrior does it" question. If I actually
want to do an assignment inside a test, I enclose it in two parenthese:


if ((index = 5)) {

and then CodeWarrior does not warn about it.  Very smart feature!


_______________________________________________ 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


_______________________________________________ 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
References: 
 >Warning: Possible Unwanted Assignment (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Warning: Possible Unwanted Assignment
  • Next by Date: Xcode search Path
  • Previous by thread: Warning: Possible Unwanted Assignment
  • Next by thread: Xcode search Path
  • Index(es):
    • Date
    • Thread