container_of 报出 warning: initialization from incompatible pointer type 解决办法
来源:互联网 发布:java工作经历怎么写 编辑:程序博客网 时间:2024/06/11 05:31
调试input 设备某sensor时候遇到一个有关container_of 报出 warning: initialization from incompatible pointer type 的警告。
这一切都是struct delayed_work work;惹的祸!
解决办法:
将
struct pcap_ts *pcap_ts = container_of(work, struct pcap_ts, work);
修改成
struct delayed_work *dw = container_of(work, struct delayed_work, work);
struct pcap_ts *pcap_ts = container_of(dw, struct pcap_ts, work);
或者
struct pcap_ts *pcap_ts = container_of(work, struct pcap_ts,work.work);
1 0
- container_of 报出 warning: initialization from incompatible pointer type 解决办法
- warning: initialization from incompatible pointer type 分析
- warning: initialization from incompatible pointer type
- initialization from incompatible pointer type
- 关于警告:initialization from incompatible pointer type [enabled by default]
- warning:initialization discards ‘const’ qualifier from pointer target type 解决方法
- assignment from incompatible pointer type
- warning: assignment from incompatible pointer type (注册hook时出现了)
- warning: passing argument 2 of 'request_irq' from incompatible pointer type导致的中断申请失败和
- 关于问题warning: passing arg 2 of `bind' from incompatible pointer type理解
- warning: passing argument 2 of 'request_irq' from incompatible pointer type导致的中断申请失败和
- warning: passing argument 2 of 'request_irq' from incompatible pointer type导致的中断申请失败和模块无法加载
- warning:discards qualifiers from pointer target type
- warning: initialization makes pointer from integer without a cast
- initialization discards 'const' qualifier from pointer target type
- warning: assignment discards qualifiers from pointer target type
- IOS Assigning to 'id<Delegate>' from incompatible type...解决办法
- IOS Assigning to 'id<Delegate>' from incompatible type...解决办法<CALayerDelegate>
- shell中 if 使用
- 如何在Beyond Compare比较表格时显示行号
- SpringMVC工作原理
- html5解决大文件断点续传
- 学习笔记之JavaSE(48)--IO流10
- container_of 报出 warning: initialization from incompatible pointer type 解决办法
- unity安装及破解教程(Windows)
- 新的征程
- RabbitMQ3.6.3集群搭建+HAProxy1.6做负载均衡
- mysqlbackup备份和还原
- 几个多序列比对软件:Muscle,ClustalW和T-coffee的简单比较
- 463. Island Perimeter
- 基于Retrofit2.0 封装的超好用的RetrofitClient
- LuaJavaBridge 使用说明