Change build flags; Ignore warnings; Alter C code?
Change build flags; Ignore warnings; Alter C code?
- Subject: Change build flags; Ignore warnings; Alter C code?
- From: Steve Cronin <email@hidden>
- Date: Thu, 16 Feb 2006 23:29:02 -0600
Folks;
I've got a little nag that the retentive part of me would like to get
out of the way.
As you will soon see, I'm NOT a C guy -- I'm on a journey to become a
Obj-C guy.
I've inherited a snippet of C that causes 2 warnings on clean builds.
Everything works correctly, but it's the only warnings I get in the
project.
And, well, I just don't like them.
Here's the relevant bit:
+ (NSString *)methodZ
{
...
CFDataRef dataRef;
UInt8 *info;
char *x;
... //CFDataGetBytePt returns a pointer to a read-
only byte buffer
info = CFDataGetBytePtr(dataRef); //****warning: assignment
discards qualifiers from pointer target type
if (info) {
...
x = info; //****warning: pointer targets in assignment differ
in signedness
...
I will eventually learn enough C to understand fully how to correct
this BUT in the meantime:
-- Should I just leave well enough alone and get over it?
-- Is there a build flag that might relieve my nettle?
-- Is there an easy change to declarations or code which would soothe
gcc but would not break anything?
(I know you need to see all the code to really answer that but I'll
take suggestions)
Thanks for your gentle acceptance of us Obj-C types who must puzzle
on these sort of things!
Steve
_______________________________________________
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