This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC v5 01/21] sunrpc/clnt_udp: Ensure total_deadline is initalised


On Thu, Sep 5, 2019 at 11:03 AM Joseph Myers <joseph@codesourcery.com> wrote:
> 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:
> > > > > 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.

Joseph, you have a tendency to throw up procedural objections to
_everything_, and I feel I need to ask you to tone it down a little.
This project has historically been perceived as unwelcoming to new
contributors, and I think a major remaining reason for that is all the
procedure -- some of which is genuinely necessary, but not all.

> 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.

In general I would agree, but this is the obsolete sunrpc directory
we're talking about; I don't think it's worth putting more than the
bare minimum effort into code that we plan to delete eventually.

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]