LinuxSir.cn,穿越时空的Linuxsir!

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

编译linux-2.6.36时,出现的警告。

[复制链接]
发表于 2010-11-9 13:01:30 | 显示全部楼层 |阅读模式
fs/autofs/root.c:30: warning: ‘autofs_root_compat_ioctl’ declared ‘static’ but never defined

这是什么意思?谢谢!
发表于 2010-11-9 19:26:23 | 显示全部楼层
  1. #ifdef CONFIG_COMPAT
  2. static long autofs_root_compat_ioctl(struct file *filp,
  3.                              unsigned int cmd, unsigned long arg)
  4. {
  5.         struct inode *inode = filp->f_path.dentry->d_inode;
  6.         int ret;
  7.         lock_kernel();
  8.         if (cmd == AUTOFS_IOC_READY || cmd == AUTOFS_IOC_FAIL)
  9.                 ret = autofs_do_root_ioctl(inode, filp, cmd, arg);
  10.         else
  11.                 ret = autofs_do_root_ioctl(inode, filp, cmd,
  12.                         (unsigned long)compat_ptr(arg));
  13.         unlock_kernel();
  14.         return ret;
  15. }
  16. #endif
复制代码

被ifdef包起来了,应该再加上else,然后只return 0
回复 支持 反对

使用道具 举报

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

本版积分规则

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