• 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
Change build flags; Ignore warnings; Alter C code?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Change build flags; Ignore warnings; Alter C code?
      • From: Andrew Thompson <email@hidden>
  • Prev by Date: Re: Displaying Text Vertically
  • Next by Date: Selection in NSTableView during windowControllerDidLoadNib w/ CoreData+bindings
  • Previous by thread: [Fwd: Re: Displaying Text Vertically]
  • Next by thread: Re: Change build flags; Ignore warnings; Alter C code?
  • Index(es):
    • Date
    • Thread