提交 8e1c091c 编写于 作者: J Jeff Garzik

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: NJeff Garzik <jeff@garzik.org>
上级 a6343afb
...@@ -278,7 +278,7 @@ void efi_memmap_walk(efi_freemem_callback_t callback, void *arg) ...@@ -278,7 +278,7 @@ void efi_memmap_walk(efi_freemem_callback_t callback, void *arg)
struct range { struct range {
unsigned long start; unsigned long start;
unsigned long end; unsigned long end;
} prev, curr; } uninitialized_var(prev), curr;
efi_memory_desc_t *md; efi_memory_desc_t *md;
unsigned long start, end; unsigned long start, end;
void *p; void *p;
......
...@@ -1867,7 +1867,8 @@ static ssize_t ocfs2_file_buffered_write(struct file *file, loff_t *ppos, ...@@ -1867,7 +1867,8 @@ static ssize_t ocfs2_file_buffered_write(struct file *file, loff_t *ppos,
loff_t pos; loff_t pos;
const struct iovec *cur_iov = iov; const struct iovec *cur_iov = iov;
struct page *user_page, *page; struct page *user_page, *page;
char *buf, *dst; char * uninitialized_var(buf);
char *dst;
void *fsdata; void *fsdata;
/* /*
......
...@@ -1356,7 +1356,7 @@ udf_load_partition(struct super_block *sb, kernel_lb_addr *fileset) ...@@ -1356,7 +1356,7 @@ udf_load_partition(struct super_block *sb, kernel_lb_addr *fileset)
case UDF_VIRTUAL_MAP15: case UDF_VIRTUAL_MAP15:
case UDF_VIRTUAL_MAP20: case UDF_VIRTUAL_MAP20:
{ {
kernel_lb_addr ino; kernel_lb_addr uninitialized_var(ino);
if (!UDF_SB_LASTBLOCK(sb)) if (!UDF_SB_LASTBLOCK(sb))
{ {
......
...@@ -385,7 +385,7 @@ copy_msqid_from_user(struct msq_setbuf *out, void __user *buf, int version) ...@@ -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) asmlinkage long sys_msgctl(int msqid, int cmd, struct msqid_ds __user *buf)
{ {
struct kern_ipc_perm *ipcp; struct kern_ipc_perm *ipcp;
struct msq_setbuf setbuf; struct msq_setbuf uninitialized_var(setbuf);
struct msg_queue *msq; struct msg_queue *msq;
int err, version; int err, version;
struct ipc_namespace *ns; struct ipc_namespace *ns;
...@@ -509,7 +509,7 @@ asmlinkage long sys_msgctl(int msqid, int cmd, struct msqid_ds __user *buf) ...@@ -509,7 +509,7 @@ asmlinkage long sys_msgctl(int msqid, int cmd, struct msqid_ds __user *buf)
err = audit_ipc_obj(ipcp); err = audit_ipc_obj(ipcp);
if (err) if (err)
goto out_unlock_up; goto out_unlock_up;
if (cmd==IPC_SET) { if (cmd == IPC_SET) {
err = audit_ipc_set_perm(setbuf.qbytes, setbuf.uid, setbuf.gid, err = audit_ipc_set_perm(setbuf.qbytes, setbuf.uid, setbuf.gid,
setbuf.mode); setbuf.mode);
if (err) if (err)
......
...@@ -856,7 +856,7 @@ static int semctl_down(struct ipc_namespace *ns, int semid, int semnum, ...@@ -856,7 +856,7 @@ static int semctl_down(struct ipc_namespace *ns, int semid, int semnum,
{ {
struct sem_array *sma; struct sem_array *sma;
int err; int err;
struct sem_setbuf setbuf; struct sem_setbuf uninitialized_var(setbuf);
struct kern_ipc_perm *ipcp; struct kern_ipc_perm *ipcp;
if(cmd == IPC_SET) { if(cmd == IPC_SET) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册