lkml.org 
[lkml]   [2011]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] cifs: fix compiler warning about incompatible pointer type (try #3)
From
2011/1/31 Pavel Shilovsky <piastry@etersoft.ru>:
> fs/cifs/file.c: In function ‘cifs_iovec_write’:
> fs/cifs/file.c:1740:9: warning: passing argument 6 of ‘CIFSSMBWrite2’ from incompatible pointer type
> fs/cifs/cifsproto.h:343:12: note: expected ‘unsigned int *’ but argument is of type ‘size_t *’
>
> Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de>
> Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
> ---
>  fs/cifs/file.c |   10 ++++++----
>  1 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/fs/cifs/file.c b/fs/cifs/file.c
> index 0de17c1..d8338e7 100644
> --- a/fs/cifs/file.c
> +++ b/fs/cifs/file.c
> @@ -1667,9 +1667,10 @@ static ssize_t
>  cifs_iovec_write(struct file *file, const struct iovec *iov,
>                 unsigned long nr_segs, loff_t *poffset)
>  {
> -       size_t total_written = 0, written = 0;
> -       unsigned long num_pages, npages;
> -       size_t copied, len, cur_len, i;
> +       unsigned int written;
> +       ssize_t total_written = 0;
> +       unsigned long num_pages, npages, i;
> +       size_t copied, len, cur_len;
>        struct kvec *to_send;
>        struct page **pages;
>        struct iov_iter it;
> @@ -1825,7 +1826,8 @@ cifs_iovec_read(struct file *file, const struct iovec *iov,
>  {
>        int rc;
>        int xid;
> -       unsigned int total_read, bytes_read = 0;
> +       ssize_t total_read;
> +       unsigned int bytes_read = 0;
>        size_t len, cur_len;
>        int iov_offset = 0;
>        struct cifs_sb_info *cifs_sb;
> --
> 1.7.1
>
>

Let's drop this one according to [PATCH] cifs: clean up some compiler
warnings patch.

--
Best regards,
Pavel Shilovsky.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-01-31 13:55    [W:0.358 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site