public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jesper Juhl <jesper.juhl@gmail.com>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: linux-kernel@vger.kernel.org, Thomas Pfeiffer <pfeiffer@pds.de>,
	isdn4linux@listserv.isdn4linux.de, Karsten Keil <kkeil@suse.de>,
	Kai Germaschewski <kai.germaschewski@gmx.de>
Subject: Re: [PATCH] isdn_v110 warning fix
Date: Tue, 30 Aug 2005 13:25:29 +0200	[thread overview]
Message-ID: <9a8748490508300425442b84e8@mail.gmail.com> (raw)
In-Reply-To: <20050830082033.GB12449@mipter.zuzino.mipt.ru>

On 8/30/05, Alexey Dobriyan <adobriyan@gmail.com> wrote:
> On Tue, Aug 30, 2005 at 01:05:43AM +0200, Jesper Juhl wrote:
> > drivers/isdn/i4l/isdn_v110.c:523: warning: `ret' might be used uninitialized in this function
> 
> > --- linux-2.6.13-orig/drivers/isdn/i4l/isdn_v110.c
> > +++ linux-2.6.13/drivers/isdn/i4l/isdn_v110.c
> > @@ -516,11 +516,11 @@
> 
> > -isdn_v110_stat_callback(int idx, isdn_ctrl * c)
> > +isdn_v110_stat_callback(int idx, isdn_ctrl *c)
> >  {
> >       isdn_v110_stream *v = NULL;
> >       int i;
> > -     int ret;
> > +     int ret = 0;
> 
> ret is used only in isdn_v110_stat_callback()::case ISDN_STAT_BSENT.
> It's possible for it to be unused only if passed c->parm.length is 0.
> Do you see codepaths that can do it?
> 
No, I don't see any codepaths that could lead to it being used uninitialized. 
I made the patch for two reasons;  1) To silence the warning, and I
guess it's simply the right thing to do.   2) To make sure the code
behaves in a resonably sane way in case the situation
c->parm.length==0 should somehow happen in the future.

-- 
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please      http://www.expita.com/nomime.html

  parent reply	other threads:[~2005-08-30 11:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-29 23:05 [PATCH] isdn_v110 warning fix Jesper Juhl
2005-08-30  8:20 ` Alexey Dobriyan
2005-08-30  8:42   ` Thomas Pfeiffer
2005-08-30 11:25   ` Jesper Juhl [this message]
2005-08-30 10:51 ` Karsten Keil
2005-08-30 13:47   ` Jesper Juhl

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=9a8748490508300425442b84e8@mail.gmail.com \
    --to=jesper.juhl@gmail.com \
    --cc=adobriyan@gmail.com \
    --cc=isdn4linux@listserv.isdn4linux.de \
    --cc=kai.germaschewski@gmx.de \
    --cc=kkeil@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pfeiffer@pds.de \
    /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