Linux NILFS development
 help / color / mirror / Atom feed
From: Ryusuke Konishi <konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
To: lihong.hi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org,
	linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] nilfs2: Remove an uninitialization warning in nilfs_btree_propagate_v()
Date: Fri, 02 Apr 2010 20:09:24 +0900 (JST)	[thread overview]
Message-ID: <20100402.200924.67912456.ryusuke@osrg.net> (raw)
In-Reply-To: <20100402104039.GA9652@xhl>

On Fri, 2 Apr 2010 18:40:39 +0800, Li Hong <lihong.hi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> `make CONFIG_NILFS2_FS=m M=fs/nilfs2/` will give the following warnings:
> 
> fs/nilfs2/btree.c: In function ‘nilfs_btree_propagate’:
> fs/nilfs2/btree.c:1882: warning: ‘maxlevel’ may be used uninitialized in this function
> fs/nilfs2/btree.c:1882: note: ‘maxlevel’ was declared here
> 
> Set maxlevel = 0 to fix it.
> 
> Signed-off-by: Li Hong <lihong.hi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Applied, thanks.

Ryusuke Konishi

> ---
>  fs/nilfs2/btree.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/nilfs2/btree.c b/fs/nilfs2/btree.c
> index 7cdd98b..76c38e3 100644
> --- a/fs/nilfs2/btree.c
> +++ b/fs/nilfs2/btree.c
> @@ -1879,7 +1879,7 @@ static int nilfs_btree_propagate_v(struct nilfs_btree *btree,
>  				   struct nilfs_btree_path *path,
>  				   int level, struct buffer_head *bh)
>  {
> -	int maxlevel, ret;
> +	int maxlevel = 0, ret;
>  	struct nilfs_btree_node *parent;
>  	struct inode *dat = nilfs_bmap_get_dat(&btree->bt_bmap);
>  	__u64 ptr;
> -- 
> 1.6.3.3
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2010-04-02 11:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-02 10:40 [PATCH] nilfs2: Remove an uninitialization warning in nilfs_btree_propagate_v() Li Hong
2010-04-02 11:09 ` Ryusuke Konishi [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=20100402.200924.67912456.ryusuke@osrg.net \
    --to=konishi.ryusuke-zyj7fxus5i5l9jvzuh4aog@public.gmane.org \
    --cc=lihong.hi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /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