[linux-cifs-client] CIFSSMBOpen prototype sparse warning

Jeff Layton jlayton at samba.org
Fri Mar 19 05:40:07 MDT 2010


On Thu, 18 Mar 2010 23:35:34 -0500
Steve French <smfrench at gmail.com> wrote:

> Any objections to cleaning up the sparse warning below:
> 
> fs/cifs/file.c:374:67: warning: incorrect type in argument 8
> (different signedness)
> fs/cifs/file.c:374:67:    expected int *pOplock
> fs/cifs/file.c:374:67:    got unsigned int *<noident>
> fs/cifs/file.c:383:66: warning: incorrect type in argument 8
> (different signedness)
> fs/cifs/file.c:383:66:    expected int *pOplock
> fs/cifs/file.c:383:66:    got unsigned int *<noident>
> fs/cifs/file.c:401:38: warning: incorrect type in argument 6
> (different signedness)
> fs/cifs/file.c:401:38:    expected int *oplock
> fs/cifs/file.c:401:38:    got unsigned int *<noident>
> fs/cifs/file.c:512:31: warning: cast from restricted fmode_t
> fs/cifs/file.c:534:52: warning: incorrect type in argument 8
> (different signedness)
> fs/cifs/file.c:534:52:    expected int *pOplock
> fs/cifs/file.c:534:52:    got unsigned int *<noident>
> 
> We define it with unsigned int *
> 
> fs/cifs/cifsproto.h:extern int CIFSSMBOpen(const int xid, struct
> cifsTconInfo *tcon,
> fs/cifs/cifsproto.h-			const char *fileName, const int disposition,
> fs/cifs/cifsproto.h-			const int access_flags, const int omode,
> fs/cifs/cifsproto.h-			__u16 *netfid, int *pOplock, FILE_ALL_INFO *,
> 
> but often call it with __u32 *
> I realize it is harmless, but like to remove warnings where reasonably possible.
> 

No objection here. I'm all for removing signed/unsigned ambiguity.

-- 
Jeff Layton <jlayton at samba.org>


More information about the linux-cifs-client mailing list