From: Mark Fasheh <mfasheh@suse.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH] /fs/ocfs2/slot_map.c (2.6.35.6): Uninitialized variable
Date: Tue, 28 Sep 2010 14:10:44 -0700 [thread overview]
Message-ID: <20100928211044.GA8031@wotan.suse.de> (raw)
In-Reply-To: <28389.94142.qm@web45810.mail.sp1.yahoo.com>
On Mon, Sep 27, 2010 at 01:28:37PM -0700, Poyo VL wrote:
> When I tried to compile I got the following warning:
> fs/ocfs2/slot_map.c: In function ?ocfs2_init_slot_info?:
> fs/ocfs2/slot_map.c:360: warning: ?bytes? may be used uninitialized in this
> function
> fs/ocfs2/slot_map.c:360: note: ?bytes? was declared here
> Compiler: gcc version 4.4.3 (GCC) on Mandriva
> I'm not sure why this warning occurs, I think compiler don't know that variable
> "bytes" is initialized when it is sent by reference to
> ocfs2_slot_map_physical_size and it throws that ugly warning.
> However, a simple initialization of "bytes" variable with 0 will fix it.
> Patch is downer, I also attached it because there are problems with Yahoo! Mail.
>
> Signed-off-by: Ionut Gabriel Popescu <poyo_vl@yahoo.com>
This looks reasonable, though using uninitialized_var() might be the
preferred method.
Acked-by: Mark Fasheh <mfasheh@suse.com>
--
Mark Fasheh
next prev parent reply other threads:[~2010-09-28 21:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-27 20:28 [Ocfs2-devel] [PATCH] /fs/ocfs2/slot_map.c (2.6.35.6): Uninitialized variable Poyo VL
2010-09-28 21:10 ` Mark Fasheh [this message]
2010-10-11 20:47 ` Joel Becker
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=20100928211044.GA8031@wotan.suse.de \
--to=mfasheh@suse.com \
--cc=ocfs2-devel@oss.oracle.com \
/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 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.