From: Dan Carpenter <dan.carpenter@oracle.com>
To: Silvan Jegen <s.jegen@gmail.com>
Cc: Phillip Lougher <phillip@squashfs.org.uk>,
lkml <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org
Subject: Re: [patch] Squashfs: silence some uninitialized variable warnings
Date: Wed, 13 Jul 2016 11:36:57 +0000 [thread overview]
Message-ID: <20160713113657.GV32247@mwanda> (raw)
In-Reply-To: <CAKvUva_iHkPh-nxJ=GiWseoe4Tv4beCb+Z8v_9VgnuCjLaRV+w@mail.gmail.com>
On Wed, Jul 13, 2016 at 01:29:32PM +0200, Silvan Jegen wrote:
> Hi Dan
>
> On Wed, Jul 13, 2016 at 12:02 PM, Dan Carpenter
> <dan.carpenter@oracle.com> wrote:
> > We print these values in the TRACE() code before we check that
> > fill_meta_index() was successful. It makes my static checker complain.
> >
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> >
> > diff --git a/fs/squashfs/file.c b/fs/squashfs/file.c
> > index 13d8094..46679e2 100644
> > --- a/fs/squashfs/file.c
> > +++ b/fs/squashfs/file.c
> > @@ -334,9 +334,9 @@ failed:
> > */
> > static int read_blocklist(struct inode *inode, int index, u64 *block)
> > {
> > - u64 start;
> > + u64 start = -1;
>
> Do you assign the negative value to the unsigned variable here on purpose?
>
Yeah. It's just a garbage value but hopefully it would stand out in the
printk.
regards,
dan carpenter
prev parent reply other threads:[~2016-07-13 11:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-13 10:02 [patch] Squashfs: silence some uninitialized variable warnings Dan Carpenter
2016-07-13 11:29 ` Silvan Jegen
2016-07-13 11:36 ` Dan Carpenter [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=20160713113657.GV32247@mwanda \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=phillip@squashfs.org.uk \
--cc=s.jegen@gmail.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;
as well as URLs for NNTP newsgroup(s).