• 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
Why does this not compile?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why does this not compile?


  • Subject: Why does this not compile?
  • From: Stephan Burlot <email@hidden>
  • Date: Wed, 5 Jan 2005 14:08:19 +0100

Hi,
This may be a little bit OT, but why does this code (in a .m file, XCode 1.5, gcc 3.3):


	SecKeychainAttribute attribute;

	attribute.tag = kSecProtocolItemAttr;
	attribute.length = 4;
	attribute.data = &kSecProtocolTypeHTTPProxy; // error HERE

gives:
error: invalid lvalue in unary `&'

With
struct SecKeychainAttribute
{
   SecKeychainAttrType tag;
   UInt32 length;
   void *data;
};

and
kSecProtocolTypeFTPProxy    = 'ftpx'

replacing the offending line with
attribute.data = "htpx";

works.

Any idea? Any magic switch to enable in XCode?

Thanks,
Stephan

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Why does this not compile?
      • From: Finlay Dobbie <email@hidden>
  • Prev by Date: Re: Preferences UI operation theory
  • Next by Date: Re: Why does this not compile?
  • Previous by thread: Re: Ignore accents when comparing strings
  • Next by thread: Re: Why does this not compile?
  • Index(es):
    • Date
    • Thread