avr-gcc: suppress warning “'__progmem__' attribute ignored”
-
22-07-2019 - |
Question
does anybody know how this warning can be suppressed? there is no way for me to avoid them (they stem from a framework i use).
Thanks!
Solution
From the gcc(1) man page:
-Wno-attributesDo not warn if an unexpected "__attribute__" is used, such as unrecognized attributes, function attributes applied to variables, etc. This will not stop errors for incorrect use of supported attributes.
OTHER TIPS
just add static
to your declaration
PROGMEM static char my_byte[100] = {0x00,0x01,0x02,0x03 ...... }
then retrieve it as
char any_byte;
int index;
any_byte = pgm_read_byte(&(my_byte[index])) ;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow