Re: CIFSSMBOpen prototype sparse warning

Jeff Layton <[email protected]>
Newsgroups gmane.linux.file-systems.cifs
Message-ID <[email protected]>
On Thu, 18 Mar 2010 23:35:34 -0500
Steve French <[email protected]> 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 <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.