lkml.org 
[lkml]   [2010]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] FS: cifs: Fix compile warning
From
On Fri, Sep 10, 2010 at 7:45 PM, Javier Martinez Canillas
<martinez.javier@gmail.com> wrote:
> In today linux-next I got a compile warning due a possibly uninitialized variable
>
> This trivial patch solves the issue
>
> Thanks a lot
>
> Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
> ---
>  fs/cifs/cifssmb.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
> index c65c341..ee1bba4 100644
> --- a/fs/cifs/cifssmb.c
> +++ b/fs/cifs/cifssmb.c
> @@ -3079,7 +3079,7 @@ CIFSSMBGetCIFSACL(const int xid, struct cifsTconInfo *tcon, __u16 fid,
>                __u32 parm_len;
>                __u32 acl_len;
>                struct smb_com_ntransact_rsp *pSMBr;
> -               char *pdata;
> +               char *pdata = NULL;

This looks like a compiler problem - the variable is always
initialized by validate_ntransact except when
buf (which contains the smb) is null, when it returns -EINVAL and in
that case pdata is not used.
Setting it to null would not help anyway - if it were left as null it
would oops on the memcpy (where pdata is used).

This area of code has not changed recently.


--
Thanks,

Steve
--
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: 2010-09-13 18:33    [W:0.034 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site