I get the warning "Format not a string literal and no format arguments" at NSLog -- how can I correc

Posted by dsobol on Stack Overflow See other posts from Stack Overflow or by dsobol
Published on 2010-05-31T23:10:47Z Indexed on 2010/05/31 23:13 UTC
Read the original article Hit count: 219

Filed under:

Hello,

I get the warning "Format not a string literal and no format arguments" on the NSLog call in the following block:

  • (void) alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex { NSLog([NSString stringWithFormat:@"%d", buttonIndex]); }

I have read in another post here that this error message indicates an insecure use of NSLog. Could someone point me in the direction of a properly formatted string for this?

Thanks for any and all assistance!

Regards,

Steve O'Sullivan

© Stack Overflow or respective owner

Related posts about cocoa