LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1407|回复: 2

yaffs2 文件系统碰到的问题

[复制链接]
发表于 2008-5-15 11:47:20 | 显示全部楼层 |阅读模式
#tar zxvf yaffs2.tar.gz
#cd yaffs2
#sh patch-ker.sh c  ../linux2.6.14.1使用上面的命令将该文件系统加入内核。在配置时出现了配置信息。
可是在编译时make zImage 。出现如下错误:

fs/yaffs2/yaffs_fs.c:294: warning: initialization from incompatible pointer type
fs/yaffs2/yaffs_fs.c:295: warning: initialization from incompatible pointer type
fs/yaffs2/yaffs_fs.c: In function 'yaffs_readdir':
fs/yaffs2/yaffs_fs.c:972: warning: assignment from incompatible pointer type
fs/yaffs2/yaffs_fs.c:972: warning: comparison of distinct pointer types lacks a cast
fs/yaffs2/yaffs_fs.c:975: warning: initialization from incompatible pointer type
fs/yaffs2/yaffs_fs.c: In function 'yaffs_rename':
fs/yaffs2/yaffs_fs.c:1276: warning: passing argument 1 of 'list_empty' from incompatible pointer type
fs/yaffs2/yaffs_fs.c: In function 'yaffs_put_super':
fs/yaffs2/yaffs_fs.c:1532: warning: passing argument 1 of 'list_del' from incompatible pointer type
fs/yaffs2/yaffs_fs.c: In function 'yaffs_internal_read_super':
fs/yaffs2/yaffs_fs.c:1816: warning: assignment from incompatible pointer type
fs/yaffs2/yaffs_fs.c:1867: warning: passing argument 1 of 'list_add_tail' from incompatible pointer type
fs/yaffs2/yaffs_fs.c: In function 'yaffs_proc_read':
fs/yaffs2/yaffs_fs.c:2077: warning: initialization from incompatible pointer type
  CC      fs/yaffs2/yaffs_guts.o
  CC      fs/yaffs2/yaffs_checkptrw.o
  CC      fs/yaffs2/yaffs_packedtags1.o
  CC      fs/yaffs2/yaffs_packedtags2.o
  CC      fs/yaffs2/yaffs_nand.o
  CC      fs/yaffs2/yaffs_qsort.o
  CC      fs/yaffs2/yaffs_tagscompat.o
  CC      fs/yaffs2/yaffs_tagsvalidity.o
  CC      fs/yaffs2/yaffs_mtdif.o
fs/yaffs2/yaffs_mtdif.c:28: error: static declaration of 'yaffs_oobinfo' follows non-static declaration
fs/yaffs2/yaffs_mtdif.h:22: error: previous declaration of 'yaffs_oobinfo' was here
fs/yaffs2/yaffs_mtdif.c:34: error: static declaration of 'yaffs_noeccinfo' follows non-static declaration
fs/yaffs2/yaffs_mtdif.h:23: error: previous declaration of 'yaffs_noeccinfo' was here
make[2]: *** [fs/yaffs2/yaffs_mtdif.o] Error 1
make[1]: *** [fs/yaffs2] Error 2
make: *** [fs] Error 2
是不是需要什么补丁或者是修改下什么东西。 急盼指点
发表于 2008-5-15 15:56:55 | 显示全部楼层
一般这种错误都不是真正的错误, 而有可能是编译器版本的问题, 比如
  1. /* xx.c */
  2. static void fn(void) {}
  3. /* xx.h */
  4. extern void fn(void);
复制代码

这在 gcc-3.x 中应该是允许的, 但是在 gcc-4.x 中就认为产生了类型冲突. 解决方法很简单, 去掉 static 即可

楼主可以看一下代码, 如果它的情况确实如同我上面提到的例子, 那么手工修改一下就行了
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-5-15 16:50:48 | 显示全部楼层
正如楼主所言,顺利通过。
厉害呀,我要是有那水平就好了
谢谢了
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表