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

Re: Why does this not compile?


  • Subject: Re: Why does this not compile?
  • From: Finlay Dobbie <email@hidden>
  • Date: Wed, 5 Jan 2005 13:23:33 +0000

On Wed, 5 Jan 2005 14:08:19 +0100, Stephan Burlot
<email@hidden> wrote:
>         attribute.data = &kSecProtocolTypeHTTPProxy; // error HERE
>
> gives:
> error: invalid lvalue in unary `&'

> kSecProtocolTypeFTPProxy    = 'ftpx'

That's not a valid operation to perform, as some value in an
enumeration has no address and thus you can't get a pointer to it.

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

Well, uh, obviously that's a valid construct.

> works.
>
> Any idea? Any magic switch to enable in XCode?

No, there is no magic switch to compile nonsensical code ;-)
You'll have to assign the value to a variable first.

SecProtocolType protocol = kSecProtocolTypeHTTPProxy;
SecKeychainAttribute attribute = { kSecProtocolItemAttr,
sizeof(SecProtocolType), &protocol };

 -- Finlay
 _______________________________________________
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: Stephan Burlot <email@hidden>
References: 
 >Why does this not compile? (From: Stephan Burlot <email@hidden>)

  • Prev by Date: Why does this not compile?
  • Next by Date: Re: Why does this not compile?
  • Previous by thread: Why does this not compile?
  • Next by thread: Re: Why does this not compile?
  • Index(es):
    • Date
    • Thread