warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]


修改驱动之后编译内核有时候会遇到如下警告:

warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]

这时候我们只需要将相应定义变量的语句放到函数的开头即可。

在内核代码中,尽可能的将变量的定义放到函数的开头


你可能感兴趣的:(warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement])