warning: ISO C90 forbids mixed declaration
来源:互联网 发布:男生淘宝图片2017 编辑:程序博客网 时间:2024/05/22 07:39
意思:C90 标准禁止混合声明;
一般出现此错误的原因是:声明写在了函数调用命令的后面,改过来就没事;
但在liunx内核编程中,即使所写命令中涉及的变量已经在模块入口函数前声明过,也不能将后续其它变量的声明写在后面;
简单的说就是要书写规范,变量的声明在模块中都最好集中写在模块的最开始的地方;
static int val = 2014;static char * str1 = "Study for yourself!\n";
static int __init ledtest_init(void){
printk(KERN_INFO "Hello,Farsight!\n");printk(KERN_INFO "Say in %d: %s",val, str1);//将这两行转移但声明的后面便可消除警告。
int ret;dev_t devno;struct resource *gpg3_res;
}
这样做同样会出现上述警告。
0 0
- warning: ISO C90 forbids mixed declaration
- warning:ISO C90 forbids mixed declarations and code
- warning:ISO C90 forbids mixed declarations and code
- warning:ISO C90 forbids mixed declarations and code
- warning: ISO C90 forbids mixed declarations and code
- warning:ISO C90 forbids mixed declarations and code
- ISO C90 forbids mixed declarations and code
- ISO C90 forbids mixed declarations and code
- error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
- warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
- ISO C90 forbids mixed declarations and code 警告
- ISO C90 forbids mixed declarations and code 警告
- ISO C90 forbids mixed declarations and code 警告
- ISO C90 forbids mixed declarations and code 警告
- ISO C90 forbids mixed declarations and code 警告
- ISO C90 forbids mixed declarations and code 警告
- ISO C90 forbids mixed declarations and code[-Wdeclaration-after-statement]
- 编译警告:ISO C90 forbids mixed declarations and code
- UILocalNotification 本地通知的用法
- flex 线形图为虚线,绘制图例(1)
- UPCC hello
- struts拦截器配置问题Unable to find interceptor class referenced by ref-name defaultStack
- Format形式下不能传入异常的解决办法
- warning: ISO C90 forbids mixed declaration
- UML之活动图
- Ruby. Vs . Python
- Java学习从菜鸟变大鸟之三 多线程中Thread 和Runnable的区别与运用
- 如何利用NLog给数据库发送日志
- 实例应用:自动答卷评分【MATLAB实现】
- [An AC a day]1050_POJ_ACM
- safari for windows的官方下载页面
- 如何在运行时修改NLog配置