[geeks] enum in C and compiler warnings
Shannon Hendrix
shannon at widomaker.com
Mon Apr 27 15:08:25 CDT 2009
I generally write C code with fairly strict compiler settings.
On some fairly new code the compiler is bitching about unused enums.
static enum {
forward, back, up, down, _ENDBUTTON_
} buttonstates;
These enums really are used, but the compiler doesn't see that for
some reason.
Is this a compiler bug, or is there something I am supposed to do here?
I frequently use enums in embedded programming to generate state lists
and things like that, and having the compiler abort on certain
warnings is quite helpful, so I hate to turn that off just to get
around this one issue.
--
"Where some they sell their dreams for small desires."
More information about the geeks
mailing list