From: Steve French Date: Fri, 16 Sep 2005 03:44:50 +0000 (-0700) Subject: [CIFS] Fix compiler warnings X-Git-Tag: v2.6.15-rc1~18^2~35^2~5^2~27 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab2f218f4fa2c36ecd39ac1406eec1e63cd430bd;p=linux-2.6 [CIFS] Fix compiler warnings Fix some compiler warnings noticed on x64 by me and ppc64 by Shaggy Signed-off-by: Steve French (sfrench@us.ibm.com) --- diff --git a/fs/cifs/asn1.c b/fs/cifs/asn1.c index e02010dd73..98539e2afe 100644 --- a/fs/cifs/asn1.c +++ b/fs/cifs/asn1.c @@ -191,7 +191,8 @@ asn1_header_decode(struct asn1_ctx *ctx, unsigned char **eoc, unsigned int *cls, unsigned int *con, unsigned int *tag) { - unsigned int def, len; + unsigned int def = 0; + unsigned int len = 0; if (!asn1_id_decode(ctx, cls, con, tag)) return 0; diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index a9c791eded..cd421c7680 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h @@ -331,7 +331,7 @@ CIFS_SB(struct super_block *sb) return sb->s_fs_info; } -static inline const char CIFS_DIR_SEP(const struct cifs_sb_info *cifs_sb) +static inline char CIFS_DIR_SEP(const struct cifs_sb_info *cifs_sb) { if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS) return '/'; diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 5ecda554f9..4173f23a71 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -791,8 +791,8 @@ static ssize_t cifs_write(struct file *file, const char *write_data, pTcon = cifs_sb->tcon; - cFYI(1,(" write %d bytes to offset %lld of %s", write_size, - *poffset, file->f_dentry->d_name.name)); /* BB removeme BB */ + cFYI(1,("write %zd bytes to offset %lld of %s", write_size, + *poffset, file->f_dentry->d_name.name)); if (file->private_data == NULL) return -EBADF; diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c index 96f89eb660..d5e0c4018f 100644 --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c @@ -485,7 +485,7 @@ SendReceive2(const unsigned int xid, struct cifsSesInfo *ses, BCC(in_buf) = le16_to_cpu(BCC(in_buf)); } else { rc = -EIO; - cFYI(1,("Bad MID state? ")); + cFYI(1,("Bad MID state?")); } } cifs_no_response_exit2: