From: Felipe Contreras Date: Sun, 18 Oct 2009 22:54:29 +0000 (+0300) Subject: ipc: fix unused variable warning X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f1970c48ef06ece4e23765501976507ab52b0edd;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git 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 Signed-off-by: Jiri Kosina --- diff --git a/ipc/msg.c b/ipc/msg.c index 2ceab7f12fc..085bd58f2f0 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, struct msqid_ds __user *buf, int version) { struct kern_ipc_perm *ipcp; - struct msqid64_ds msqid64; + struct msqid64_ds uninitialized_var(msqid64); struct msg_queue *msq; int err;