[Ocfs2-devel] [PATCH] /fs/ocfs2/slot_map.c (2.6.35.6): Uninitialized variable

Joel Becker Joel.Becker at oracle.com
Mon Oct 11 13:47:17 PDT 2010


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 at yahoo.com>

	This patch is now in the merge-window branch of ocfs2.git.  In
the future, please send patches inline without MIME.

Joel
-- 

"The lawgiver, of all beings, most owes the law allegiance.  He of all
 men should behave as though the law compelled him.  But it is the
 universal weakness of mankind that what we are given to administer we
 presently imagine we own."
        - H.G. Wells

Joel Becker
Consulting Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127



More information about the Ocfs2-devel mailing list