日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

差之毫厘,谬以千里

發布時間:2024/1/18 编程问答 36 豆豆
生活随笔 收集整理的這篇文章主要介紹了 差之毫厘,谬以千里 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
今天在編一段代碼的時候,遇到一個很奇怪的報錯:
In file included from include/asm-generic/int-ll64.h:10:0,from /home/charles/code/linux-3.10.28/include/uapi/asm-generic/types.h:7,from arch/arm/include/generated/asm/types.h:1,from include/uapi/linux/types.h:4,from include/linux/types.h:5,from include/linux/list.h:4,from include/linux/module.h:9,from /home/charles/code/modules/testproc.c:5: include/uapi/asm-generic/int-ll64.h:19:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'typedef'typedef __signed__ char __s8;^ In file included from include/linux/list.h:4:0,from include/linux/module.h:9,from /home/charles/code/modules/testproc.c:5: include/linux/types.h:98:1: error: unknown type name '__s8'typedef __s8 int8_t;^ In file included from include/linux/quota.h:42:0,from include/linux/fs.h:245,from include/linux/proc_fs.h:8,from /home/charles/code/modules/testproc.c:6: /home/charles/code/linux-3.10.28/include/uapi/linux/dqblk_xfs.h:51:2: error: unknown type name '__s8'__s8 d_version; /* version of this structure */^ /home/charles/code/linux-3.10.28/include/uapi/linux/dqblk_xfs.h:52:2: error: unknown type name '__s8'__s8 d_flags; /* FS_{USER,PROJ,GROUP}_QUOTA */^ /home/charles/code/linux-3.10.28/include/uapi/linux/dqblk_xfs.h:153:2: error: unknown type name '__s8'__s8 qs_version; /* version number for future changes */^ /home/charles/code/linux-3.10.28/include/uapi/linux/dqblk_xfs.h:155:2: error: unknown type name '__s8'__s8 qs_pad; /* unused */

這些報錯完全是在內核代碼里的,查了半天也沒找出問題。。

后來看了下自己的代碼,發現在一個注釋行開頭,多了個字母 i...

<strong><span style="color:#FF0000;">i</span></strong>/*This program is used to allocate memory in kernel and pass the physical address to userspace through proc file.*/#include <linux/version.h> #include <linux/module.h> #include <linux/proc_fs.h> #include <linux/mm.h>

去掉之后,上面的問題就沒了。


總結

以上是生活随笔為你收集整理的差之毫厘,谬以千里的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。