linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Halasa <khc@pm.waw.pl>
To: Paul Mackerras <paulus@au1.ibm.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	linux-kernel@vger.kernel.org,
	Marcelo Tosatti <marcelo@conectiva.com.br>
Subject: Re: [PATCH] 2.4.19 warnings cleanup
Date: 05 Aug 2002 11:41:04 +0200	[thread overview]
Message-ID: <m3k7n51w3z.fsf@defiant.pm.waw.pl> (raw)
In-Reply-To: <15693.49493.300424.746502@argo.ozlabs.ibm.com>

Paul Mackerras <paulus@au1.ibm.com> writes:

> > > --- linux/drivers/net/ppp_generic.c.orig	Sat Aug  3 17:13:58 2002
> > > +++ linux/drivers/net/ppp_generic.c	Sat Aug  3 19:11:54 2002
> > > @@ -378,7 +378,7 @@
> > >  {
> > >  	struct ppp_file *pf = file->private_data;
> > >  	DECLARE_WAITQUEUE(wait, current);
> > > -	ssize_t ret;
> > > +	ssize_t ret = 0; /* suppress compiler warning */
> > >  	struct sk_buff *skb = 0;
> > >  
> The code is in ppp_read actually OK; if you trace through the logic
> you can prove that ret is never actually used without being set first.

That's right - that's exactly why I wrote "suppress compiler warning".
It's just the compiler not smart enough (of course, i looked at the code
paths and I'd just fix it if it was broken).

Anyway, it seems there are more places like that in the kernel tree, so,
as Alan said, the correct thing to improve is the compiler (not even sure
if gcc3 would print the warning, I'm using RH "2.96" gcc).
-- 
Krzysztof Halasa
Network Administrator

  reply	other threads:[~2002-08-05 20:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-03 20:06 [PATCH] 2.4.19 warnings cleanup Krzysztof Halasa
2002-08-04 14:16 ` Alan Cox
2002-08-04 23:28   ` Krzysztof Halasa
2002-08-05  0:05   ` Paul Mackerras
2002-08-05  9:41     ` Krzysztof Halasa [this message]
2002-08-05  3:02   ` David S. Miller
2002-08-07  2:07     ` bill davidsen

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=m3k7n51w3z.fsf@defiant.pm.waw.pl \
    --to=khc@pm.waw.pl \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    --cc=paulus@au1.ibm.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).