[PATCH] /fs/cifs/cifssmb.c (2.6.35.5): Simple pointer initialization
Steve French
smfrench at gmail.com
Sun Sep 26 15:11:44 MDT 2010
Seems that it makes it more confusing? - if null were a valid value
for pdata we would need to check for this later in the function before
the memcpy
It didn't throw that error on my gcc version - is your gcc older or do
you use different compile options or different arch?
On Sun, Sep 26, 2010 at 6:05 AM, Poyo VL <poyo_vl at yahoo.com> wrote:
> When I tried to compile the kernel (make allyesconfig) I got the following ugly
> warning:
> fs/cifs/cifssmb.c: In function ‘CIFSSMBGetCIFSACL’:
> fs/cifs/cifssmb.c:3082: warning: ‘pdata’ may be used uninitialized in this
> function
> The pdata pointer is prctically initialized in line 3086 and it is used in line
> 3122, but the compiler can't be sure that pdata will be used initialized so it
> throws that ugly warning. Just initializing *pdata with NULL will get rid off
> that warning.
> Patch downer. I also attached it because someone told me that there are problems
> with Yahoo! Mail, it trims spaces or tabs...
>
> Signed-off-by: Ionut Gabriel Popescu <poyo_vl at yahoo.com>
> ---
>
> --- a/fs/cifs/cifssmb.c 2010-09-20 23:59:09.000000000 +0300
> +++ b/fs/cifs/cifssmb.c 2010-09-26 13:05:45.281241095 +0300
> @@ -3079,7 +3079,7 @@ CIFSSMBGetCIFSACL(const int xid, struct
> __u32 parm_len;
> __u32 acl_len;
> struct smb_com_ntransact_rsp *pSMBr;
> - char *pdata;
> + char *pdata = NULL;
>
> /* validate_nttransact */
> rc = validate_ntransact(iov[0].iov_base, (char **)&parm,
>
>
>
--
Thanks,
Steve
More information about the samba-technical
mailing list