From: Jesse Millan <jessem@cs.pdx.edu>
To: kernel-janitors@vger.kernel.org
Subject: [KJ] [PATCH] Fix gcc4 warning,
Date: Wed, 25 May 2005 22:41:22 +0000 [thread overview]
Message-ID: <4294FF12.7020506@cs.pdx.edu> (raw)
In-Reply-To: <428E3224.8030307@cs.pdx.edu>
[-- Attachment #1: Type: text/plain, Size: 216 bytes --]
Same same. This patch eliminates the warning that is generated
when passing a reference of an uninitialized variable to a function
where it possible that the function will return without initializing
that variable.
[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 615 bytes --]
Signed-off-by: Jesse Millan <jessem@cs.pdx.edu>
--- linux-2.6.12-rc4/fs/devfs/base.c~ 2005-05-25 15:22:47.710055525 -0700
+++ linux-2.6.12-rc4/fs/devfs/base.c 2005-05-25 15:26:15.975096985 -0700
@@ -1127,8 +1127,11 @@ static devfs_handle_t _devfs_make_parent
if (dir == NULL)
dir = _devfs_get_root_entry();
- if (dir == NULL)
+ if (dir == NULL) {
+ /* Function would have returned without initializing 'leaf_pos' */
+ *leaf_pos = 0;
return NULL;
+ }
devfs_get(dir);
/* Search for possible trailing component and ignore it */
for (--namelen; (namelen > 0) && (name[namelen] != '/'); --namelen) ;
[-- Attachment #3: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
next prev parent reply other threads:[~2005-05-25 22:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-20 18:53 [KJ] [PATCH] Fix gcc4 warning, Jesse Millan
2005-05-20 19:41 ` Alexey Dobriyan
2005-05-22 9:25 ` Arnd Bergmann
2005-05-23 1:05 ` Arnd Bergmann
2005-05-24 4:52 ` Jesse Millan
2005-05-24 4:56 ` Jesse Millan
2005-05-25 6:09 ` Jesse Millan
2005-05-25 22:41 ` Jesse Millan [this message]
2005-05-26 21:07 ` Arnd Bergmann
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=4294FF12.7020506@cs.pdx.edu \
--to=jessem@cs.pdx.edu \
--cc=kernel-janitors@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;
as well as URLs for NNTP newsgroup(s).