format string warnings for printf vs NSString
format string warnings for printf vs NSString
- Subject: format string warnings for printf vs NSString
- From: Sean McBride <email@hidden>
- Date: Fri, 13 Jan 2012 17:37:40 -0500
- Organization: Rogue Research Inc.
Hi all,
Given:
printf("format %d");
[NSString stringWithFormat:@"format %d"];
With Xcode 4.2.1's clang or llvm-gcc:
clang -Wall -Wextra -Wformat=2 -fsyntax-only test.m
I get a warning for printf but not for NSString:
warning: more '%' conversions than data arguments [-Wformat]
The declarations of both are decorated with __attribute__ __format__.
Why isn't it working for NSString? Didn't this used to work?
Cheers,
--
____________________________________________________________
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