All of lore.kernel.org
 help / color / mirror / Atom feed
* [KJ] [PATCH] Removal of compiler warnings in ipc/msg.c
@ 2007-07-17  9:38 Rune V. Sjøen
  2007-07-17  9:43 ` Bernd Petrovitsch
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Rune V. Sjøen @ 2007-07-17  9:38 UTC (permalink / raw)
  To: kernel-janitors

Hello, this is my first patch so please be gentle.
It fixes some compiler warnings in ipc/msg.c

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

Any kind of feedback would be appreciated if i've done something wrong.

--
diff --git a/ipc/msg.c b/ipc/msg.c
index cbd27e5..e5e62ca 100644
--- a/ipc/msg.c
+++ b/ipc/msg.c
@@ -390,6 +390,8 @@ asmlinkage long sys_msgctl(int msqid, int cmd,
struct msqid_ds __user *buf)
       int err, version;
       struct ipc_namespace *ns;

+       memset(&setbuf, '0', sizeof(setbuf));
+
       if (msqid < 0 || cmd < 0)
               return -EINVAL;

-- 
-=<X>=-
Rune V. Sjøen
You always pass failure on the way to success

http://www.opensourcesolutions.no

_______________________________________________
REMINDER: this mailing list moved to vger.kernel.org and current one will be discontinued soon.
To resubscribe, send email to majordomo@vger.kernel.org with
&quot;subscribe kernel-janitors&quot; in message body and follow instructions.

Kernel-janitors mailing list
Kernel-janitors@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-07-19  8:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-17  9:38 [KJ] [PATCH] Removal of compiler warnings in ipc/msg.c Rune V. Sjøen
2007-07-17  9:43 ` Bernd Petrovitsch
2007-07-17 10:00 ` Rune V. Sjøen
2007-07-17 10:12 ` Bernd Petrovitsch
2007-07-17 15:24 ` Randy Dunlap
2007-07-17 15:57 ` Matthew Wilcox
2007-07-17 16:01 ` "Rune V. Sjøen"
2007-07-18 22:34 ` Denver Gingerich
2007-07-19  8:13 ` pradeep singh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.