Re: Question about a gcc 4 warning
Re: Question about a gcc 4 warning
- Subject: Re: Question about a gcc 4 warning
- From: Lawrence Gold <email@hidden>
- Date: Fri, 12 Aug 2005 18:20:44 -0600
Kevin Hoyt wrote:
Hi all,
Just a quick question about a warning from gcc 4.
given this code
fileName[] = "myfile";
char *path=StrDup(path=NULL, fileName);
You have a case of modifying a variable twice without an intervening
sequence point:
http://www.embedded.com/shared/printableArticle.jhtml?articleID=9900661
It's quite possible that your example is unambiguous, but why set path
to null when you're just going to reassign it anyway? Wouldn't
char *path=StrDup(NULL, fileName);
work just as well and be clearer?
_______________________________________________
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