• 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: Another useless warning - 'Hidden Local Variables'
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Another useless warning - 'Hidden Local Variables'


  • Subject: Re: Another useless warning - 'Hidden Local Variables'
  • From: Andy O'Meara <email@hidden>
  • Date: Thu, 24 Jul 2008 12:25:37 -0400



On Jul 23, 2008, at 7:11 PM, Chris Jefferson wrote:

2008/7/23 Matt Gough <email@hidden>:
But your example is not what I am complaining about. I want the warnings
that your example would give.


What I don't want is the ones where the name of a method parameter matches
the name of a member function.



Remember that method parameters could themselves be functions. Also you can assign member functions to variables of appropriate type. I personally would want to be warned about such clashes.

Chris


All fine and agreed upon, Chris, but Matt's main point still stands. I myself also have also witnessed the pain illustrated in Matt's main example and recall feeling highly concerned about the inadequacy of the warning's implementation. Codewarrior, for example, *does* catch these cases of hidden local vars and that's how we generally spot them. Unfortunately, however, the ability to "check" compile under CW becomes increasingly more of a PITA (and I'm guessing the same goes for you, Sean, iirc). So, the question becomes, is the best plan for each of us to just submit radars for this one? I know I'm definitely willing to as long as Apple is the right tree to start barking up.

This reminds me of one of my favorite code humor pieces:

   if ( status = NUCLEAR_WAR ) launch_counter_attack();

But I'll adapt it for this topic:

   if ( is_war_simulation() ) int status = 0;
   if ( status == NUCLEAR_WAR ) launch_counter_attack();



Andy


_______________________________________________ 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: 
 >Another useless warning - 'Hidden Local Variables' (From: Matt Gough <email@hidden>)
 >Re: Another useless warning - 'Hidden Local Variables' (From: "Eric Miller" <email@hidden>)
 >Re: Another useless warning - 'Hidden Local Variables' (From: Matt Gough <email@hidden>)
 >Re: Another useless warning - 'Hidden Local Variables' (From: "Chris Jefferson" <email@hidden>)

  • Prev by Date: REPOST : Problem creating a new Target
  • Next by Date: Scroll area jumps when typing a single or double-quote
  • Previous by thread: Re: Another useless warning - 'Hidden Local Variables'
  • Next by thread: xcodebuild 3.1 crashes
  • Index(es):
    • Date
    • Thread