• 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: Stupid "warning: declaration of 'index' shadows a global declaration"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Stupid "warning: declaration of 'index' shadows a global declaration"


  • Subject: Re: Stupid "warning: declaration of 'index' shadows a global declaration"
  • From: Steve Mills <email@hidden>
  • Date: Mon, 16 Nov 2009 10:00:33 -0600

On Nov 15, 2009, at 14:07:19, Keary Suska wrote:

> I would add that what I think is "stupid" is the warning being flagged when a variable declaration masks a function declaration. If it were just variable shadowing I would heartily support it. Not only is the warning immediately misleading, but what coder in her right mind would make a function call without parentheses?

long calc(void)
{
	return some math;
}

typedef long (*CalcCallback)(void);

void blah(void)
{
	CalcCallback		callback = calc;
	long			result = calc();
}

There ya go.

Steve Mills
Drummer, Mac geek
http://sjmills5.home.mchsi.com/


 _______________________________________________
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

  • Prev by Date: Re: Stupid "warning: declaration of 'index' shadows a global declaration"
  • Next by Date: Haywired Call Stack in resymbolized Crash Report
  • Previous by thread: Re: Stupid "warning: declaration of 'index' shadows a global declaration"
  • Next by thread: custom build location
  • Index(es):
    • Date
    • Thread