[Top] [All Lists]

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

To: Christoph Hellwig <hch@xxxxxx>
Subject: Re: [PATCH] XFS: Fix gcc 4.6 set but not read and unused statement warnings v2
From: Andi Kleen <andi@xxxxxxxxxxxxxx>
Date: Mon, 14 Jun 2010 15:39:58 +0200
Cc: Andi Kleen <ak@xxxxxxxxxxxxxxx>, Andi Kleen <andi@xxxxxxxxxxxxxx>, xfs@xxxxxxxxxxx, dgc@xxxxxxxxxxxxx
In-reply-to: <20100614124804.GA8547@xxxxxx>
References: <20100614081356.GA27499@xxxxxxxxxxxxxxx> <20100614083021.GA29354@xxxxxx> <4C15EF75.5080909@xxxxxxxxxxxxxxx> <20100614124804.GA8547@xxxxxx>
User-agent: Mutt/1.5.17 (2007-11-01)
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)

% grep XFS .config
# CONFIG_XFS_QUOTA is not set
# CONFIG_XFS_RT is not set
% make CC=gcc46 SUBDIRS=fs/xfs
  LD      fs/xfs/built-in.o
  CC [M]  fs/xfs/linux-2.6/xfs_trace.o
  CC [M]  fs/xfs/linux-2.6/xfs_acl.o
  CC [M]  fs/xfs/linux-2.6/xfs_stats.o
  CC [M]  fs/xfs/linux-2.6/xfs_sysctl.o
  CC [M]  fs/xfs/linux-2.6/xfs_ioctl32.o
  CC [M]  fs/xfs/xfs_alloc.o
  CC [M]  fs/xfs/xfs_alloc_btree.o
  CC [M]  fs/xfs/xfs_attr.o
  CC [M]  fs/xfs/xfs_attr_leaf.o
  CC [M]  fs/xfs/xfs_bit.o
  CC [M]  fs/xfs/xfs_bmap.o
  CC [M]  fs/xfs/xfs_bmap_btree.o
  CC [M]  fs/xfs/xfs_btree.o
  CC [M]  fs/xfs/xfs_buf_item.o
  CC [M]  fs/xfs/xfs_da_btree.o   <---------------------------------
  CC [M]  fs/xfs/xfs_dir2.o
  CC [M]  fs/xfs/xfs_dir2_block.o
fs/xfs/xfs_dir2_block.c: In function 'xfs_dir2_sf_to_block':
fs/xfs/xfs_dir2_block.c:1153:26: warning: array subscript is above array bounds 

Do I need to set some other option?


ak@xxxxxxxxxxxxxxx -- Speaking for myself only.

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