[PATCH] /fs/cifs/cifssmb.c ( Simple pointer initialization

Poyo VL poyo_vl at yahoo.com
Sun Sep 26 05:05:35 MDT 2010

When I tried to compile the kernel (make allyesconfig) I got the following ugly 
fs/cifs/cifssmb.c: In function ‘CIFSSMBGetCIFSACL’:
fs/cifs/cifssmb.c:3082: warning: ‘pdata’ may be used uninitialized in this 
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,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: application/octet-stream
Size: 387 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20100926/46fb650e/attachment.obj>

More information about the samba-technical mailing list