• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
wprintf does not honor "Typecheck calls to printf/scanf" setting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: wprintf does not honor "Typecheck calls to printf/scanf" setting
      • From: "Sean McBride" <email@hidden>
  • Prev by Date: Re: wrong value for LONG_MAX (9223372036854775807 rather than 2147483647) on macintosh 10.6 ?
  • Next by Date: Universal "./configure" projects: Inaccurate TechNote?
  • Previous by thread: Re: wrong value for LONG_MAX (9223372036854775807 rather than 2147483647) on macintosh 10.6 ?
  • Next by thread: Re: wprintf does not honor "Typecheck calls to printf/scanf" setting
  • Index(es):
    • Date
    • Thread