wprintf does not honor "Typecheck calls to printf/scanf" setting
wprintf does not honor "Typecheck calls to printf/scanf" setting
- Subject: wprintf does not honor "Typecheck calls to printf/scanf" setting
- From: Ben Staveley-Taylor <email@hidden>
- Date: Fri, 4 Dec 2009 12:43:42 +0000
I have just fixed a bug in my own code which would have been spotted far earlier by a compiler warning. I was not passing enough parameters to printf.
If I do :
printf("%s%s", "test");
I correctly get the warning "warning: too few arguments for format"
But as I am using wchar_t versions of everything (for cross-platform code reasons) I do this:
wprintf(L"%S%S", L"test");
And not a peep from the compiler. No warning. Just a crash when you run it.
I have the "Typecheck calls to printf/scanf" option on. Is there another option to set to enable the warning for wchar_t code?
Thanks,
Ben Staveley-Taylor
_______________________________________________
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