netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: netdev@ml.breakpoint.cc
Cc: socketcan@hartkopp.net, herbert@gondor.apana.org.au,
	netdev@vger.kernel.org
Subject: Re: authenc compile warnings in current net-2.6.24
Date: Wed, 10 Oct 2007 16:25:28 -0700 (PDT)	[thread overview]
Message-ID: <20071010.162528.91758998.davem@davemloft.net> (raw)
In-Reply-To: <20071010195337.GA21597@Chamillionaire.breakpoint.cc>

From: Sebastian Siewior <netdev@ml.breakpoint.cc>
Date: Wed, 10 Oct 2007 21:53:37 +0200

> * Oliver Hartkopp | 2007-10-10 19:53:53 [+0200]:
> 
> > CC [M] crypto/authenc.o
> > crypto/authenc.c: In function ?crypto_authenc_hash?:
> > crypto/authenc.c:88: warning: ?cryptlen? may be used uninitialized in this 
> > function
> > crypto/authenc.c:87: warning: ?dst? may be used uninitialized in this 
> > function
> > crypto/authenc.c: In function ?crypto_authenc_decrypt?:
> > crypto/authenc.c:163: warning: ?cryptlen? may be used uninitialized in this 
> > function
> > crypto/authenc.c:163: note: ?cryptlen? was declared here
> > crypto/authenc.c:162: warning: ?src? may be used uninitialized in this 
> > function
> > crypto/authenc.c:162: note: ?src? was declared here
> >
> > do you already know these warnings?
> 
> Those warnings are looking like a compiler bug to me.

It's just not smart enough to see that cryptlen's initialization
and it's use in the auth_unlock label path are both protected
by 'err' being non-zero.

To be honest I don't know of any compiler which commits enough
flow variable analysis to support doing %100 accurate warnings
in situations like this.

Since the compiler is unlikely to do so, I think we should fix
it somehow because useless warnings just distract.

  reply	other threads:[~2007-10-10 23:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-10 17:53 authenc compile warnings in current net-2.6.24 Oliver Hartkopp
2007-10-10 19:53 ` Sebastian Siewior
2007-10-10 23:25   ` David Miller [this message]
2007-10-11  3:23     ` Herbert Xu
2007-10-11  3:26       ` Herbert Xu
2007-10-11 10:58     ` Sebastian Siewior
2007-10-11 16:38       ` Oliver Hartkopp
  -- strict thread matches above, loose matches on Subject: below --
2007-10-12  6:15 Oliver Hartkopp
2007-10-12 10:18 ` Herbert Xu

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=20071010.162528.91758998.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=netdev@ml.breakpoint.cc \
    --cc=netdev@vger.kernel.org \
    --cc=socketcan@hartkopp.net \
    /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).