• 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
compiler warning when attempting to save hex value in char in reusing it
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

compiler warning when attempting to save hex value in char in reusing it


  • Subject: compiler warning when attempting to save hex value in char in reusing it
  • From: "Sebastian Pape" <email@hidden>
  • Date: Wed, 5 Sep 2007 02:03:26 +0200

I've been working with XCode and Cocoa for a few days now and got a little
stuck with a problem:
 char seq =  0x02;
 NSMutableData *sequence = [[NSMutableData alloc] init];
 [sequence appendBytes:seq length: 1];


I always get a warning from the compiler telling me:  warning: passing
argument 1 of 'appendBytes:length:' makes pointer from integer without a
cast
*
*
When I start the application I can work with it, but I think there might be
a general mistake I make with chars and hex values. I looked all over the
internet and was not able to find why that is so far. Could you explain me
how I can put a hex character into a char and then hand that over to a
NSMutableArray without a warning and those cast problems.


Thanks
Sebastian.
_______________________________________________

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

  • Follow-Ups:
    • Re: compiler warning when attempting to save hex value in char in reusing it
      • From: Charles Steinman <email@hidden>
    • Re: compiler warning when attempting to save hex value in char in reusing it
      • From: Tim Kolar <email@hidden>
  • Prev by Date: Re: Setting up the nextKeyView programmatically
  • Next by Date: Re: compiler warning when attempting to save hex value in char in reusing it
  • Previous by thread: Re: NSButtonCell image leaking? [SOLVED]
  • Next by thread: Re: compiler warning when attempting to save hex value in char in reusing it
  • Index(es):
    • Date
    • Thread