• 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
Re: "Format not a string literal and no format arguments"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "Format not a string literal and no format arguments"


  • Subject: Re: "Format not a string literal and no format arguments"
  • From: Uli Kusterer <email@hidden>
  • Date: Tue, 1 Sep 2009 09:43:32 +0200

Am 29.08.2009 um 21:25 schrieb Ken Thomases:
When you don't provide a constant format string but you do provide arguments, it is assumed that you at least haven't made the most common form of mistake. Your code seems to recognize that the first argument is a format string which may require further arguments. In this case, the compiler can't check consistency between the format string and the subsequent arguments, but generating a warning would flag too much correct code.

Actually, last I checked, the compiler actually *was* smart enough to check the format string matches the parameters. Got lots of warnings about e.g. using %d for a long and stuff like that.


This is a comparatively new thing, though. It was new in Leopard or Snow Leopard, but wasn't available before.

Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de





_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: "Format not a string literal and no format arguments"
  • Next by Date: Re: Scripting Bridge and multiple attachments
  • Previous by thread: Re: "Format not a string literal and no format arguments"
  • Next by thread: Re: "Format not a string literal and no format arguments"
  • Index(es):
    • Date
    • Thread