Re: compiler warning when attempting to save hex value in char in reusing it
Re: compiler warning when attempting to save hex value in char in reusing it
- Subject: Re: compiler warning when attempting to save hex value in char in reusing it
- From: Tim Kolar <email@hidden>
- Date: Tue, 4 Sep 2007 17:14:27 -0700
You want to pass a pointer to the seq, not the seq itself.
so,
[sequence appendBytes:&seq length:1];
On Sep 4, 2007, at 5:03 PM, Sebastian Pape wrote:
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
_______________________________________________
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