使用PIC , 将一组数据及地址存放在ROM中, 将地址数据读取时, 提示warning: assignment makes pointer from integer without a cast
程式拮取如下:
unsigned int *buf1;
const unsigned int parameter[] = {
3, 0, 2, &VoltagePara,
2, 0, 2, &FreqPara,
2, 0, 2, &dummy,
2, 0, 2, &dummy,
2, 0, 2, &dummy,
2, 0, 2, &dummy
}
buf1 = parameter[(mbuf1 << 2) + 3]; // 读取地址,会提warning
*buf1 = mbuf2;
如何修改可以将异常去掉?? |