Re: "Format not a string literal and no format arguments"
Re: "Format not a string literal and no format arguments"
- Subject: Re: "Format not a string literal and no format arguments"
- From: Uli Kusterer <email@hidden>
- Date: Tue, 1 Sep 2009 09:43:32 +0200
Am 29.08.2009 um 21:25 schrieb Ken Thomases:
When you don't provide a constant format string but you do provide
arguments, it is assumed that you at least haven't made the most
common form of mistake. Your code seems to recognize that the first
argument is a format string which may require further arguments. In
this case, the compiler can't check consistency between the format
string and the subsequent arguments, but generating a warning would
flag too much correct code.
Actually, last I checked, the compiler actually *was* smart enough
to check the format string matches the parameters. Got lots of
warnings about e.g. using %d for a long and stuff like that.
This is a comparatively new thing, though. It was new in Leopard or
Snow Leopard, but wasn't available before.
Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden