public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix uninitialized warnings in mempolicy.c
@ 2004-09-10 22:20 Jesse Barnes
  2004-09-11  4:33 ` [PATCH] [ppc64] Remove -Wno-uninitialized Anton Blanchard
  0 siblings, 1 reply; 3+ messages in thread
From: Jesse Barnes @ 2004-09-10 22:20 UTC (permalink / raw)
  To: akpm, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 233 bytes --]

Sorry if you already got these fixes, but err may be used uninitialized in 
mempolicy.c in both compat_set_mempolicy and compat_mbind.  This patch fixes 
that by setting them both to 0.

Signed-off-by: Jesse Barnes <jbarnes@sgi.com>

[-- Attachment #2: compat-mempolicy-warning-fixes.patch --]
[-- Type: text/plain, Size: 691 bytes --]

===== mm/mempolicy.c 1.14 vs edited =====
--- 1.14/mm/mempolicy.c	2004-09-07 23:32:56 -07:00
+++ edited/mm/mempolicy.c	2004-09-10 15:16:51 -07:00
@@ -557,7 +557,7 @@
 asmlinkage long compat_set_mempolicy(int mode, compat_ulong_t __user *nmask,
 				     compat_ulong_t maxnode)
 {
-	long err;
+	long err = 0;
 	unsigned long __user *nm = NULL;
 	unsigned long nr_bits, alloc_size;
 	DECLARE_BITMAP(bm, MAX_NUMNODES);
@@ -581,7 +581,7 @@
 			     compat_ulong_t mode, compat_ulong_t __user *nmask,
 			     compat_ulong_t maxnode, compat_ulong_t flags)
 {
-	long err;
+	long err = 0;
 	unsigned long __user *nm = NULL;
 	unsigned long nr_bits, alloc_size;
 	DECLARE_BITMAP(bm, MAX_NUMNODES);

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

end of thread, other threads:[~2004-09-11  5:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-10 22:20 [PATCH] fix uninitialized warnings in mempolicy.c Jesse Barnes
2004-09-11  4:33 ` [PATCH] [ppc64] Remove -Wno-uninitialized Anton Blanchard
2004-09-11  5:20   ` [PATCH] [ppc32] " Anton Blanchard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox