• 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
Question about a gcc 4 warning
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Question about a gcc 4 warning


  • Subject: Question about a gcc 4 warning
  • From: Kevin Hoyt <email@hidden>
  • Date: Fri, 12 Aug 2005 16:15:45 -0700

Hi all,
Just a quick question about a warning from gcc 4.

given this code

fileName[] = "myfile";
char *path=StrDup(path=NULL, fileName);

Where StrDup() takes two pointers to char.

I get 'Operation on "path" may be undefined'


The question, is why?  Seems to me that 'path' should be assigned NULL
before the call to strdup and all is well...

And bonus points to whomever can site the ANSI standard that the warning
comes from :-)


Kevin Hoyt

 _______________________________________________
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

  • Follow-Ups:
    • Re: Question about a gcc 4 warning
      • From: Lawrence Gold <email@hidden>
  • Prev by Date: Problems moving to 2.1
  • Next by Date: Re: Can a private framework have a version and compelled to launch according to OS version?
  • Previous by thread: Re: Problems moving to 2.1
  • Next by thread: Re: Question about a gcc 4 warning
  • Index(es):
    • Date
    • Thread