Vincent Trouilliez wrote:
... get a warning about the destination pointer:
... passing argument 1 of ‘memcpy’ discards qualifiers from pointer target
type
Well, this is a pretty clear warning. Look at what you're passing to
memcopy as argument 1 and then look for any type qualifiers in its
declaration. Ahah! "volatile". Does formal argument 1 of memcpy have the
volatile qualifier? No. Therefore, you're discarding it from the actual
argument. That is, inside memcpy, the variable is no longer being treated
as volatile. How you fix this depends on whether you care or not. If you
need to preserve the volatile treatment, you'll have to write a replacement
for memcpy. If you can let it go, just use an explicit cast.
Graham.
_______________________________________________
AVR-GCC-list mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list