public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: xfs@oss.sgi.com
Subject: Re: [PATCH] xfsidbg: fix uninitialized variable warning
Date: Mon, 1 Dec 2008 07:04:26 -0500	[thread overview]
Message-ID: <20081201120426.GA19856@infradead.org> (raw)
In-Reply-To: <20081112114609.GB15216@infradead.org>

On Wed, Nov 12, 2008 at 06:46:09AM -0500, Christoph Hellwig wrote:
> We don't initializ s.br_state in xfsidbg_btree_trace_record so gcc
> rightly complains about accessing it in xfsidbg_xbirec.  Given that we
> don't get the state value from the tracing code just opencode printing
> the other which actually reduces code size and makes the XFS_BTNUM_BMAP
> case in xfsidbg_btree_trace_record more similar to the others.

Ping?

> 
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> 
> Index: linux-2.6-xfs/fs/xfs/xfsidbg.c
> ===================================================================
> --- linux-2.6-xfs.orig/fs/xfs/xfsidbg.c	2008-11-12 11:14:39.000000000 +0100
> +++ linux-2.6-xfs/fs/xfs/xfsidbg.c	2008-11-12 11:17:14.000000000 +0100
> @@ -2759,16 +2759,11 @@ xfsidbg_btree_trace_record(
>  {
>  	switch (btnum) {
>  	case XFS_BTNUM_BMAP:
> -	{
> -		struct xfs_bmbt_irec s;
> -
> -		s.br_startoff = ((xfs_dfiloff_t)l0 << 32) | (xfs_dfiloff_t)l1;
> -		s.br_startblock = ((xfs_dfsbno_t)l2 << 32) | (xfs_dfsbno_t)l3;
> -		s.br_blockcount = ((xfs_dfilblks_t)l4 << 32) | (xfs_dfilblks_t)l5;
> -
> -		xfsidbg_xbirec(&s);
> +		kdb_printf("startoff %Ld startblock %Lx blockcount %Ld\n",
> +			   ((xfs_dfiloff_t)l0 << 32) | (xfs_dfiloff_t)l1,
> +			   ((xfs_dfsbno_t)l2 << 32) | (xfs_dfsbno_t)l3,
> +			   ((xfs_dfilblks_t)l4 << 32) | (xfs_dfilblks_t)l5);
>  		break;
> -	}
>  	case XFS_BTNUM_BNO:
>  	case XFS_BTNUM_CNT:
>  		qprintf(" startblock = %d, blockcount = %d\n",
> 
> 
---end quoted text---

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

      reply	other threads:[~2008-12-01 12:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-12 11:46 [PATCH] xfsidbg: fix uninitialized variable warning Christoph Hellwig
2008-12-01 12:04 ` Christoph Hellwig [this message]

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=20081201120426.GA19856@infradead.org \
    --to=hch@infradead.org \
    --cc=xfs@oss.sgi.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox