Request assistance with GCC Warnings
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