summaryrefslogtreecommitdiff
path: root/ipc
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2007-07-17 05:40:59 -0400
committerJeff Garzik <jeff@garzik.org>2007-07-17 16:23:19 -0400
commit8e1c091cccd551557d24ce845715e8ceb6c49d36 (patch)
tree28f1ea20efe46dd6f62cc0cb77f65be56e7225fc /ipc
parenta6343afb6e16b65b9f0b264f94f8207212e7e3ae (diff)
downloadlinux-3.10-8e1c091cccd551557d24ce845715e8ceb6c49d36.tar.gz
linux-3.10-8e1c091cccd551557d24ce845715e8ceb6c49d36.tar.bz2
linux-3.10-8e1c091cccd551557d24ce845715e8ceb6c49d36.zip
arch/i386/* fs/* ipc/*: mark variables with uninitialized_var()
Mark variables with uninitialized_var() if such a warning appears, and analysis proves that the var is initialized properly on all paths it is used. Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'ipc')
-rw-r--r--ipc/msg.c4
-rw-r--r--ipc/sem.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/ipc/msg.c b/ipc/msg.c
index cbd27e51994..a03fcb522ff 100644
--- a/ipc/msg.c
+++ b/ipc/msg.c
@@ -385,7 +385,7 @@ copy_msqid_from_user(struct msq_setbuf *out, void __user *buf, int version)
asmlinkage long sys_msgctl(int msqid, int cmd, struct msqid_ds __user *buf)
{
struct kern_ipc_perm *ipcp;
- struct msq_setbuf setbuf;
+ struct msq_setbuf uninitialized_var(setbuf);
struct msg_queue *msq;
int err, version;
struct ipc_namespace *ns;
@@ -509,7 +509,7 @@ asmlinkage long sys_msgctl(int msqid, int cmd, struct msqid_ds __user *buf)
err = audit_ipc_obj(ipcp);
if (err)
goto out_unlock_up;
- if (cmd==IPC_SET) {
+ if (cmd == IPC_SET) {
err = audit_ipc_set_perm(setbuf.qbytes, setbuf.uid, setbuf.gid,
setbuf.mode);
if (err)
diff --git a/ipc/sem.c b/ipc/sem.c
index 89bfdffb38d..b676fef6d20 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -856,7 +856,7 @@ static int semctl_down(struct ipc_namespace *ns, int semid, int semnum,
{
struct sem_array *sma;
int err;
- struct sem_setbuf setbuf;
+ struct sem_setbuf uninitialized_var(setbuf);
struct kern_ipc_perm *ipcp;
if(cmd == IPC_SET) {