Morning, I am trying to copy part of a buffer into another buffer with memcpy():
memcpy(KLineFrameM1, &Buff[2], 66); ... but get a warning about the destination pointer: ui.c:989: warning: passing argument 1 of ‘memcpy’ discards qualifiers from pointer target type KLineFrameM1 is declared and initialised in a different C file, as extern volatile. I think memcpy must have a problem with this because when I substituted this buffer with a local one, it didn't complain. Ideas (other than flaming me, of course ;-) ? Here is the code: kline.h ------- extern volatile uint8_t KLineFrameM1[65]; *************************************************************** kline.c ------- #include "kline.h" volatile uint8_t KLineFrameM1[65] = {0x01, 0x09, ..... }; ************************************************************** ui.c ----- #include "kline.h" uint8_t Buff[68]; memcpy(KLineFrameM1, &Buff[2], 66); Regards, -- Vince _______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list