• 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: Can't figure out compiler warning (C/Objective-c)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't figure out compiler warning (C/Objective-c)


  • Subject: Re: Can't figure out compiler warning (C/Objective-c)
  • From: Mark Dawson <email@hidden>
  • Date: Mon, 18 Apr 2005 00:25:53 -0700

The problem was pointed out to me off-list--I needed to use void in the empty parens:

void setupUserDefaultsAndRegister(void)

Mark

On Apr 17, 2005, at 11:16 PM, Mark Dawson wrote:

In my .h file I have:
extern void setupUserDefaultsAndRegister();

In my .m file I have:

void setupUserDefaultsAndRegister() { … }

I get a warning (pointing to the declaration line) that I don't understand:

Defaults.m:177: warning: no previous prototype for `setupUserDefaultsAndRegister'

Why did you use the extern keyword in the prototype? It seems to me that it isn't necessary to do that. Try removing it and see what happens.


Nick Zitzmann
<http://seiryu.home.comcast.net/>
S/MIME signature available upon request


_______________________________________________ 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: 
 >Can't figure out compiler warning (C/Objective-c) (From: Mark Dawson <email@hidden>)
 >Re: Can't figure out compiler warning (C/Objective-c) (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Bizarre XCode compilation bug (?) - can't find Carbon headers
  • Next by Date: Re: Bizarre XCode compilation bug (?) - can't find Carbon headers
  • Previous by thread: Re: Can't figure out compiler warning (C/Objective-c)
  • Next by thread: Bizarre XCode compilation bug (?) - can't find Carbon headers
  • Index(es):
    • Date
    • Thread