警告1:
drivers/media/video/adv7180_hyc.c:241:2: warning: initialization from incompatible pointer type [enabled by default]
原因是函数的参数不对
正确的参数:
static long tw_chrdev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
出现warming的参数:
static long tw_chrdev_ioctl(struct file *file, int cmd, unsigned long arg)
警告2:
drivers/media/video/adv7180_hyc.c:40:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
tmp=®_addr;
struct i2c_client* client = tlv_client;
由于第二句话是定义并赋值,所以定义还是要放到第一句赋值语句之前的。