xfs
[Top] [All Lists]

Re: [PATCH] XFS: Fix gcc 4.6 set but not read and unused statement warni

To: Andi Kleen <andi@xxxxxxxxxxxxxx>
Subject: Re: [PATCH] XFS: Fix gcc 4.6 set but not read and unused statement warnings v2
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Tue, 15 Jun 2010 21:48:03 -0500
Cc: Andi Kleen <ak@xxxxxxxxxxxxxxx>, Christoph Hellwig <hch@xxxxxx>, dgc@xxxxxxxxxxxxx, xfs@xxxxxxxxxxx
In-reply-to: <20100614163122.GB369@xxxxxxxxxxxxxxx>
References: <20100614081356.GA27499@xxxxxxxxxxxxxxx> <20100614083021.GA29354@xxxxxx> <4C15EF75.5080909@xxxxxxxxxxxxxxx> <20100614124804.GA8547@xxxxxx> <20100614133958.GH17092@xxxxxxxxxxxxxxx> <20100614163122.GB369@xxxxxxxxxxxxxxx>
User-agent: Thunderbird 2.0.0.24 (Macintosh/20100228)
Andi Kleen wrote:
> On Mon, Jun 14, 2010 at 03:39:58PM +0200, Andi Kleen wrote:
>> On Mon, Jun 14, 2010 at 02:48:04PM +0200, Christoph Hellwig wrote:
>>> On Mon, Jun 14, 2010 at 10:59:33AM +0200, Andi Kleen wrote:
>>>>> How can this work?  bp->data is a void pointer.
>>>> It compiled with CONFIG_XFS_DEBUG enabled. Do I need to set some other
>>>> option to test this?
>>> It fails for me in a normal CONFIG_XFS_DEBUG build:
>>>
>>> fs/xfs/xfs_da_btree.c: In function 'xfs_da_root_join':
>>> fs/xfs/xfs_da_btree.c:737: warning: dereferencing 'void *' pointer
>>> fs/xfs/xfs_da_btree.c:737: error: request for member 'magic' in
>>> something not a structure or union
>>> fs/xfs/xfs_da_btree.c:737: warning: dereferencing 'void *' pointer
>>
>> Hmm, it really compiled here (scratching head)
> 
> Never mind, it seems SUBDIRS doesn't set the DEBUG flag correctly. 

really?

$ make SUBDIRS=fs/xfs
  CC [M]  fs/xfs/linux-2.6/xfs_super.o
fs/xfs/linux-2.6/xfs_super.c:73:2: error: #error DEBUG
make[1]: *** [fs/xfs/linux-2.6/xfs_super.o] Error 1

$ grep -A3 XFS_DEBUG fs/xfs/linux-2.6/xfs_super.c 
#ifdef CONFIG_XFS_DEBUG
#error DEBUG
#endif

(above just for testing)

Offtopic I guess, but it sure seems to set it for me.

-Eric

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