Re: Fixing fmode_t warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The same kind of thing causes a sparse warning in fs/open.c (and
fs/namei.c and fs/locks.c too)

CHECK   fs/open.c
fs/open.c:270:29: warning: incorrect type in argument 2 (different base types)
fs/open.c:270:29:    expected unsigned int [unsigned] mode
fs/open.c:270:29:    got restricted fmode_t [usertype] <noident>

fs/open.c:	error = break_lease(inode, FMODE_WRITE);

On Tue, Nov 18, 2008 at 10:41 AM, Steve French <smfrench@xxxxxxxxx> wrote:
> Do you think it is worthwhile fixing this "sparse" warning ?  oflags
> is an int since the lookup intent open.flags is an int ...
>
> CHECK   fs/cifs/dir.c
> fs/cifs/dir.c:169:16: warning: restricted fmode_t degrades to integer
> fs/cifs/dir.c:171:16: warning: restricted fmode_t degrades to integer
>
>                int oflags = nd->intent.open.flags;
>                desiredAccess = 0;
> (line 169) if (oflags & FMODE_READ)
>                        desiredAccess |= GENERIC_READ;
> (line 171) if (oflags & FMODE_WRITE) {
>
>
> --
> Thanks,
>
> Steve
>



-- 
Thanks,

Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux