aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2009-10-18 18:54:29 -0400
committerJiri Kosina <jkosina@suse.cz>2009-12-04 09:39:49 -0500
commitf1970c48ef06ece4e23765501976507ab52b0edd (patch)
treeb8db16b9b697a3cc33f69ceaf7998c4ad3576e9c
parente9de25dda359c9272998daddeae7788376a44e41 (diff)
ipc: fix unused variable warning
Commit a0d092f introduced the following warning: ipc/msg.c: In function ?msgctl_down?: ipc/msg.c:415: warning: ?msqid64? may be used uninitialized in this function The gcc warning in this case is actually bogus, as msqid64 is touched only iff cmd == IPC_SET, and in such case, copy_msqid_from_user() initializes it properly. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r--ipc/msg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ipc/msg.c b/ipc/msg.c
index 2ceab7f12fcb..085bd58f2f07 100644
--- a/ipc/msg.c
+++ b/ipc/msg.c
@@ -412,7 +412,7 @@ static int msgctl_down(struct ipc_namespace *ns, int msqid, int cmd,
412 struct msqid_ds __user *buf, int version) 412 struct msqid_ds __user *buf, int version)
413{ 413{
414 struct kern_ipc_perm *ipcp; 414 struct kern_ipc_perm *ipcp;
415 struct msqid64_ds msqid64; 415 struct msqid64_ds uninitialized_var(msqid64);
416 struct msg_queue *msq; 416 struct msg_queue *msq;
417 int err; 417 int err;
418 418