discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSLog and " character


From: Thomas Davie
Subject: Re: NSLog and " character
Date: Wed, 18 Jan 2012 17:15:15 +0000

Note,

Clang actually has a warning for functions taking format strings
1) for when you provide a non-literal as the first argument
2) for when you provide more placeholders in the forma string than you provide 
arguments.

Tom Davie

On 18 Jan 2012, at 16:38, Riccardo Mottola wrote:

> Hi,
> 
> yes, it falls into the category "missing the obvious".
> 
> It crashes on cocoa too, I can confirm that i was into this before. the line 
> should obviously have been:
> 
> NSLog(@"token: %@", token);
> 
> when your debug introduces another bug...
> 
> Riccardo
> 
> On 01/18/2012 04:59 PM, Gregory Casamento wrote:
>> Since you have the %@ in the line which reads NSLog(@"token: %@") the
>> presence of the %@ implies that there will be a set of parameters in
>> the va_arg list which is passed into that function.
>> 
>> You don't have anything there.   I have seen this failure on OPENSTEP
>> and Cocoa as well as GNUste.   So this shouldn't be considered a
>> problem/bug.
>> 
>> GC
>> 
> 
> 
> _______________________________________________
> Discuss-gnustep mailing list
> Discuss-gnustep@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnustep




reply via email to

[Prev in Thread] Current Thread [Next in Thread]