compiler warning when attempting to save hex value in char in reusing it
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