From: Jesse Barnes <jbarnes@engr.sgi.com>
To: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: [PATCH] fix uninitialized warnings in mempolicy.c
Date: Fri, 10 Sep 2004 15:20:12 -0700 [thread overview]
Message-ID: <200409101520.12653.jbarnes@engr.sgi.com> (raw)
[-- 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);
next reply other threads:[~2004-09-10 22:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-10 22:20 Jesse Barnes [this message]
2004-09-11 4:33 ` [PATCH] [ppc64] Remove -Wno-uninitialized Anton Blanchard
2004-09-11 5:20 ` [PATCH] [ppc32] " Anton Blanchard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200409101520.12653.jbarnes@engr.sgi.com \
--to=jbarnes@engr.sgi.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox