[PATCH -mm] sys_msgctl gcc 4.1 warning fix

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

 



Fixes the following warning,

ipc/msg.c: In function 'sys_msgctl':
ipc/msg.c:338: warning: 'setbuf.qbytes' may be used uninitialized in this function
ipc/msg.c:338: warning: 'setbuf.uid' may be used uninitialized in this function
ipc/msg.c:338: warning: 'setbuf.gid' may be used uninitialized in this function
ipc/msg.c:338: warning: 'setbuf.mode' may be used uninitialized in this function

-Off-By: Daniel Walker <[email protected]>

Index: linux-2.6.16/ipc/msg.c
===================================================================
--- linux-2.6.16.orig/ipc/msg.c
+++ linux-2.6.16/ipc/msg.c
@@ -335,7 +335,7 @@ asmlinkage long sys_msgctl (int msqid, i
 {
 	int err, version;
 	struct msg_queue *msq;
-	struct msq_setbuf setbuf;
+	struct msq_setbuf setbuf = {0, 0, 0, 0};
 	struct kern_ipc_perm *ipcp;
 	
 	if (msqid < 0 || cmd < 0)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux