Re: warning at nslog
Re: warning at nslog
- Subject: Re: warning at nslog
- From: "Sean McBride" <email@hidden>
- Date: Mon, 28 Sep 2009 12:29:45 -0400
- Organization: Rogue Research Inc.
On 9/27/09 6:26 PM, Matt Neuburg said:
>>Omitting the format string is an anti-pattern that's been common for a
>>long time in C, with many functions such as printf() that also take a
>>format string argument. Think about what happens at run time if your
>>path string happens to contain a format specifier such as %s.
>>
>>One should always - yes, ALWAYS - use a format string, even when it
>>adds nothing to the output:
>
>I agree, and I'm happy that this warning is now given.
But don't be lulled into a false sense of security. :) The warning has
worked for printf and friends for a long time, and now in 10.6 it works
with NSLog and friends, but it still does not work in other places, such
as the SenTestingKit macros like STAssertEquals.
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
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