From: Andrew Morton <akpm@linux-foundation.org>
To: Johannes Weiner <hannes-kernel@saeurebad.de>
Cc: roland <devzero@web.de>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] - fix compile warning: `found' might be used uninitialized in this function
Date: Thu, 22 Mar 2007 00:45:40 -0800 [thread overview]
Message-ID: <20070322004540.45d8ee87.akpm@linux-foundation.org> (raw)
In-Reply-To: <20070321235607.GA10998@localhost>
On Thu, 22 Mar 2007 00:56:08 +0100 Johannes Weiner <hannes-kernel@saeurebad.de> wrote:
> On Thu, Mar 22, 2007 at 12:48:05AM +0100, roland wrote:
> > fs/block_dev.c: In function `bd_claim_by_kobject':
> > fs/block_dev.c:953: warning: `found' might be used uninitialized in this
> > function
>
> found actually _is_ used uninitialized if the call to bd_claim() returns
> anything but 0.
No, it isn't.
if (res || found)
free_bd_holder(bo);
`found' won't be evaluated if res!=0.
The code in there is irksome - it'd be nice to find some way of
restructuring it to make it less obscure, and to kill that warning.
next prev parent reply other threads:[~2007-03-22 8:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-21 23:48 [PATCH] - fix compile warning: `found' might be used uninitialized in this function roland
2007-03-21 23:56 ` Johannes Weiner
2007-03-22 8:45 ` Andrew Morton [this message]
2007-03-22 16:26 ` Johannes Weiner
2007-03-22 17:16 ` Johannes Weiner
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=20070322004540.45d8ee87.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=devzero@web.de \
--cc=hannes-kernel@saeurebad.de \
--cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.