warning: missing braces around initializer
這主要發生在結構體中多維或多個數組初始化的時候,其錯誤發生的原因是沒有用大括號明確的區分出初始化數據的歸類,改正的方法如下例子:
struct chinese_12_12 // 12*12漢字字模數據結構
{
unsigned char Index[2];
unsigned char Msk[24];
};
const struct chinese_12_12 ch_12_12[] PROGMEM=
{
{{"武"}, {0x01,0x80,0x7D,0x40,0x01,0x40,0xFF,0xE0,
0x11,0x00,0x51,0x00,0x5F,0x00,0x51,0x00,
0x50,0xA0,0x5E,0xA0,0xE0,0x60,0x00,0x00}},
{{"漢"}, {0x40,0x40,0x2F,0xE0,0x04,0x40,0x94,0x40,
0x54,0x80,0x22,0x80,0x22,0x80,0xC1,0x00,
0x42,0x80,0x44,0x40,0x58,0x20,0x00,0x00}}
};