IAR用375的时候编译有两个警告,请帮忙看看怎么解决

Warning[w6]: Type conflict for external/entry "mCmdParam", in module CH375MAI against external/entry in module CH375HFT; class/struct/union field names do not match: Other16 vs Query /* In module CH375MAI: */ CMD_PARAM_I mCmdParam; typedef CMD_PARAM CMD_PARAM_I; typedef union _CMD_PARAM CMD_PARAM; /* In module CH375HFT: */ CMD_PARAM_I mCmdParam; typedef CMD_PARAM CMD_PARAM_I; typedef union _CMD_PARAM CMD_PARAM; Warning[w35]: There is more than one definition for the struct/union type with tag '_CMD_PARAM'; class/struct/union field names do not match: Query vs Other16 union _CMD_PARAM /* Elements: 19, Bytes: 30 */ { struct /* Elements: 1, Bytes: 30 */ { UINT8 mBuffer[30]; } Other; struct /* Elements: 4, Bytes: 13 */ { UINT32 mReserved; UINT32 mTotalSector; UINT32 mFreeSector; UINT8 mDiskFat; } Query; 大意是说那个共用体的名称和长度都和库里面定义的不相符,不知道是不是这个意思?

该怎么解决呢?

使用IAR编译器是会存在这两个警告,定义的类型和库里面的不一致, 但不会影响库文件的使用。


哦,谢谢。

不过看到有警告心里还是很不爽的,总是希望能尽量的完美一点。


只有登录才能回复,可以选择微信账号登录