xfs
[Top] [All Lists]

Re: Patch fs/xfs/xfs_alloc.c

To: Poyo VL <poyo_vl@xxxxxxxxx>
Subject: Re: Patch fs/xfs/xfs_alloc.c
From: Alex Elder <aelder@xxxxxxx>
Date: Thu, 16 Sep 2010 10:38:38 -0500
Cc: Dave Chinner <david@xxxxxxxxxxxxx>, xfs@xxxxxxxxxxx
In-reply-to: <739371.35999.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <356042.32153.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <20100902052106.GU705@dastard> <739371.35999.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Reply-to: aelder@xxxxxxx
On Thu, 2010-09-02 at 00:41 -0700, Poyo VL wrote:
> Im using "gcc version 4.5.0 20100604 [gcc-4_5-branch revision 160292] (SUSE 
> Linux)"
> 
> Before compiling kernel (2.6.35.4) I selected from menuconfig all XFS 
> "options": 
> Quota supprt, POSIX ACL support, Realtime subvolume support and Debugging 
> support. I saved the .config and I typed "make". 
> 
> 
> I got the following warnings:
> 
> fs/xfs/xfs_alloc.c: In function ‘xfs_alloc_ag_vextent_near’:
> fs/xfs/xfs_alloc.c:694:15: warning: ‘ltlena’ may be used uninitialized in 
> this 
> function
> fs/xfs/xfs_alloc.c:683:15: warning: ‘gtlena’ may be used uninitialized in 
> this 
> function
> 
> So I tried to initialize those variables (structures) with 0.
> 
> Sorry, I am not neither a C, nor a kernel expert.

I'm going to take this in (to top-of-tree), but
I'll be modifying it slightly (xfs_extlen_t is
not a struct, so I'll initialize with a simple 0).
It may well be that these variables never get used
without being set, but it's not at all clear from
a quick look so this is a simple fix.

Thanks for reporting the warning.

Reviewed-by: Alex Elder <aelder@xxxxxxx>


<Prev in Thread] Current Thread [Next in Thread>