This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC v5 01/21] sunrpc/clnt_udp: Ensure total_deadline is initalised
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Alistair Francis <alistair23 at gmail dot com>
- Cc: Zack Weinberg <zackw at panix dot com>, Alistair Francis <alistair dot francis at wdc dot com>, GNU C Library <libc-alpha at sourceware dot org>, Arnd Bergmann <arnd at arndb dot de>, Adhemerval Zanella <adhemerval dot zanella at linaro dot org>, Florian Weimer <fweimer at redhat dot com>, Palmer Dabbelt <palmer at sifive dot com>, <macro at wdc dot com>, Zong Li <zongbox at gmail dot com>
- Date: Thu, 5 Sep 2019 15:02:16 +0000
- Subject: Re: [RFC v5 01/21] sunrpc/clnt_udp: Ensure total_deadline is initalised
- Ironport-sdr: 32MX1piiPL/o4FuUW5eD7i3IZkQ2ypjvzhSemnIQTFE5HrSvCBTIKSUKtmPd8jmILMYzLP8Pgs 2dXa61t7fLzyNbZ0GC+umdvVY6WdQ9g23GLUA1Rjf8CrFS16IcW5iMBwjJg39LOKhUozqOFUxF xkCuKbelOAmXb/V+nWgFYi2hbWbZwzBDNKm2QxZOtu/mw2+Z4m10rxBTKdDyBTcOpad9TOzUv2 trj59GVGvSjmOcQkJ8s+7cyIdGejR8cXEhT606c3rTiw6Xgx45Q9k29SKx0Cz7mT8v7KpWPHmm GAc=
- Ironport-sdr: /MbNbiopQgdDv2Iaz8C4/Z3ydGmtyxeIyKnC1ZBHm7s2rIUyXbvFGAkwArzxaRz5YrxrmaPeJA btOQ9gCEQYiv5MmZDObqF987SiRV7pE9PnGb2zT/txvcliTSdQsEJBFj96PJSK2uQi3tVtnkfv UOEFAyXg3RGOQizOzwDjXLGAOdPJ7znBeZE0iCKw4sNp4baFjz1+bjq9sKAM/bR2Vamqb/EIok laEem/Cug314JMSD1rvUmxcyXypkY+u2cBacX0SZHujXJ9ELX1tpzVskjMYHmniVdXTIxfdlyk REU=
- References: <cover.1567097252.git.alistair.francis@wdc.com> <871316fb87a99a59c31e6d3fbd4d35bff2ecc3c4.1567097252.git.alistair.francis@wdc.com> <alpine.DEB.2.21.1908291721250.4240@digraph.polyomino.org.uk> <CAKCAbMjmQaFTJ3NskTttrVPoSb-OmLJok1+Qe5hwaXa3VSpwXg@mail.gmail.com> <CAKmqyKMTG8kWkjJ2+OWY3kxOch45Qg4sVfcfA719djCfyrGuWg@mail.gmail.com>
On Thu, 5 Sep 2019, Alistair Francis wrote:
> On Thu, Aug 29, 2019 at 10:34 AM Zack Weinberg <zackw@panix.com> wrote:
> >
> > On Thu, Aug 29, 2019 at 1:22 PM Joseph Myers <joseph@codesourcery.com> wrote:
> > > On Thu, 29 Aug 2019, Alistair Francis wrote:
> > >The long pole is definitely the ml2014 build environment, unless for some reason we need the new version of pip first? I don't actually know. I'm assu
> > > > Even though total_deadline won't be accessed uninitalised GCC can still
> > > > complain that it is accessed unitalised, to avod those errors let's make
> > > > sure we initalise it to 0.
> > >
> > > It's glibc practice (although missing from
> > > <https://sourceware.org/glibc/wiki/Style_and_Conventions>) that we *don't*
> > > add initializations like that to avoid warnings.
> >
> > Although this has historically been glibc practice, I think it is
> > unwisely incautious, and we should change the policy to be that we
> > *do* add initializations whenever the compiler thinks a variable even
> > _might_ be used uninitialized.
>
> Does that mean this patch is ok?
No. You can't deduce consensus like that from two different views on a
patch or a convention. Even if we were to change the convention regarding
how to silence such warnings, I see reason to have any less requirement
for comments explaining why the warning is a false positive and that the
initializer is only there to silence a warning than there is for the
DIAG_* macros.
--
Joseph S. Myers
joseph@codesourcery.com