• 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
Request assistance with GCC Warnings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Request assistance with GCC Warnings


  • Subject: Request assistance with GCC Warnings
  • From: Eric Hermanson <email@hidden>
  • Date: Thu, 25 Jun 2009 19:13:20 -0400

Hello,

I realize this is really a GCC question, and not a Cocoa question, but I can't seem to find an adequate answer on the web. Considering I'm from a strictly Java background, I was hoping someone could clue me in to what the following two GCC warnings mean, if I should worry about them, how to fix them (or how to silence the warnings):


#1 Not protecting function: no buffer at least 8 bytes long

Does the first warning have to do with the required memory boundaries at runtime, such that variables need to be of a power-of-two length, or something like that?

 	example problem code:   uint8_t bytes[] = {'a', 'b', 'c'};


#2: Not protecting local variables: variable length buffer

As for the second warning, I thought one could define a local buffer with a length that is calculated and stored into a local variable, but maybe not?

	i.e.:  uint8_t dataBytes[count];

Thank You,
Eric


_______________________________________________

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: Request assistance with GCC Warnings
      • From: Dave Carrigan <email@hidden>
  • Prev by Date: Re: Number of images in main bundle folder (iPhone)
  • Next by Date: Re: Number of images in main bundle folder (iPhone)
  • Previous by thread: Re: NSArrayController "Auto Rearrange Content" causes "Cannot remove an observer for key path" error
  • Next by thread: Re: Request assistance with GCC Warnings
  • Index(es):
    • Date
    • Thread