编译内核模块 error: void value not ignored as it ought to be
来源:互联网 发布:路由器端口限制 编辑:程序博客网 时间:2024/06/01 08:45
感谢作者:http://blog.csdn.net/nemo2011/article/details/7301469
今天编译内核模块的时候出现 error: void value not ignored as it ought to be这样的错误
具体如下:
drivers/char/yikai2.c: In function 'globalvar_exit':drivers/char/yikai2.c:37: error: void value not ignored as it ought to bemake[2]: *** [drivers/char/yikai2.o] Error 1make[1]: *** [drivers/char] Error 2make: *** [drivers] Error 2[root@localhost linux-2.6.30.4]#
查找对应的37位置所在的代码
int ret = unregister_chrdev ( ......... );
我们查找该函数的所在文件.
在linux/fs.h头文件,里面定义了unregister_chrdev()函数:
extern void unregister_chrdev(unsigned int,const char *);
对void类型函数进行取值,所以报错.
我们将其改为:
extern int unregister_chrdev(unsigned int,const char *);
再编译即可通过.
- 编译内核模块 error: void value not ignored as it ought to be
- error: void value not ignored as it ought to be
- error: void value not ignored as it ought to be .
- error: void value not ignored as it ought to be
- error: void value not ignored as it ought to be
- void value not ignored as it ought to be
- void value not ignored as it ought to be
- void value not ignored as it ought to be
- void value not ignored as it ought to be
- void value not ignored as it ought to be
- 解决:void value not ignored as it ought to be
- void value not ignored as it ought to be
- Android之error: void value not ignored as it ought to be(In function 'callMethod2')解决办法
- glog函数调用出现c++:void value not ignored as it ought to be错误
- Cache Reheating - Not to be Ignored
- 30.In which situation may the UNDO_RETENTION parameter be ignored, even if it is set to a value?
- ERROR: Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp
- It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be
- java程序各个组成部分
- js在开发碰到很多的逻辑分支情况解决思路
- zoj 2212 || poj 2051 Argus
- Oracle 的表的管理----表名和列的命名规则和数据类型
- OSGi中获取Service的几种方式
- 编译内核模块 error: void value not ignored as it ought to be
- 带姓名的成绩单。。。。
- VMware Workstation 9 for linux 序列号
- SQL各种连接查询
- WINPE操作系统
- android 耳机按钮深层理解
- JQuery技术介绍总结
- SQL Server 安全性部分实验
- sharepoint 部署步骤“回收 IIS 应用程序池”中出现错误: 本地 SharePoint 服务器不可用