• 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: multi-character character constant and CFString
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: multi-character character constant and CFString


  • Subject: Re: multi-character character constant and CFString
  • From: Chris Espinosa <email@hidden>
  • Date: Tue, 26 Jul 2005 22:58:55 -0700

On Jul 26, 2005, at 8:42 AM, Lawrence Gold wrote:

You can turn this warning off. In XCode, go to your target settings. In the search box type "four character literals". Make sure it's unchecked.

Another way to fix it, though it's kind of ugly, is to preface the code with \0: Change 'JP' to '\0\0JP'.\

Ugly and not endian-safe. When you build for Intel you'll get 0x0000 in your short.


Better to use

short foo = *(short *)("JP")

Chris

_______________________________________________
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: multi-character character constant and CFString
      • From: Eric Albert <email@hidden>
References: 
 >multi-character character constant and CFString (From: Julien Palmas <email@hidden>)
 >Re: multi-character character constant and CFString (From: Sailesh Agrawal <email@hidden>)
 >Re: multi-character character constant and CFString (From: Lawrence Gold <email@hidden>)

  • Prev by Date: warnings
  • Next by Date: Re: multi-character character constant and CFString
  • Previous by thread: Re: multi-character character constant and CFString
  • Next by thread: Re: multi-character character constant and CFString
  • Index(es):
    • Date
    • Thread