我有一个声明为的函数:
void event_add_card (EventAddr addr, EventType type, unsigned char card);
和工会
typedef union EventData
{
float money; /**< money info */
unsigned char card; /**< new card */
}
EventData;
当我编译以下代码时:
EventData data = {};
event_add_card (0,0, data.card);
启用警告-Wconversion
我收到以下警告:
player-stud.c|71| warning: passing argument 3 of 'event_add_card' with different width due to prototype
为什么 gcc4 不成功以及如何修复它???