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: Jonathan del Strother <email@hidden>
- Date: Sat, 29 Aug 2009 19:45:58 +0100
No - I really am seeing NSLog(@"Hello") producing a warning. I did
find the culprit, though - OTHER_CFLAGS=-fno-constant-cfstrings. The
project is for a loadable bundle - I guess I need to dig around to
figure out if I can safely get rid of it...
On Sat, Aug 29, 2009 at 6:36 PM, Quincey
Morris<email@hidden> wrote:
> On Aug 29, 2009, at 05:36, Jonathan del Strother wrote:
>
>> After upgrading to snow leopard & Xcode 3.2, I've starting getting
>> this warning on NSLogs -
>>
>> NSLog(@"Hello"); // 'Format not a string literal and no format
>> arguments'
>> NSLog(@"Hello %@", name); // compiles fine
>>
>>
>> I must have some weird project setting somewhere since a new test
>> project didn't throw these warnings, but I can't see what it is. Any
>> suggestions?
>
> This is addressed in the Snow Leopard Foundation release notes (under
> NSString). This should now produce a warning:
>
> NSString* hello = @"Hello";
> NSLog (hello);
>
> but this should not:
>
> NSLog (@"Hello");
>
> Is that what you're seeing?
>
>
>
>
> _______________________________________________
>
> 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
>
_______________________________________________
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