问题:
struct menu_type
{
const unsigned char *icon;
...
};
static struct menu_type menu_list[] =
{
...
};
while( menu_list[i].icon > 0 )
gcc编译报警告:
warning: ordered comparison of pointer with integer zero [-Wextra]
while( menu_list[i].icon > 0 )
解决:
修改为以下值就不会报警告了
while( menu_list[i].icon > (unsigned char *)0 )
或者
while( menu_list[i].icon > (unsigned char *)NULL )