This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

C4487E Warning

Warning:
file.c(212): warning: C4487E: read from variable 'config' with offset out of bounds

I'm getting this warning with the following code:

uint16_t config = 100;
uint8_t configMsg[2][4];
memcpy(configMsg[0], &config, sizeof(configMsg[0]));

But I don't understand why. Anyone have any insights? It compiles w/o warning if I sub in
memcpy(configMsg[0], &config, 3);

But if I sub in
memcpy(configMsg[0], &config, 4);
it generates the warning again.