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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---

--- 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,


      

Attachment: patch.diff
Description: Binary data


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux