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 <alistair dot francis at wdc dot com>
- Cc: <libc-alpha at sourceware dot org>, <arnd at arndb dot de>, <adhemerval dot zanella at linaro dot org>, <fweimer at redhat dot com>, <palmer at sifive dot com>, <macro at wdc dot com>, <zongbox at gmail dot com>, <alistair23 at gmail dot com>
- Date: Thu, 29 Aug 2019 17:22:37 +0000
- Subject: Re: [RFC v5 01/21] sunrpc/clnt_udp: Ensure total_deadline is initalised
- Ironport-sdr: R1g35B8Ei35p+93wNUsgNYA/gxsyARcMTaC3Y9cbmJb6Fn3spxpaCExkq9bhNi1JBRt5y1IDim i+CUz2XH2BepCdl6qWL0qTi+lcvUpExBTgAys9ddQbprR7480AX6VN4fusluX3O74Z5oPzXLCn ZGVGDH5WjVsjH8UJQBV4JOvupnu0JNbckUTQ+/m6t5t0OxuKAbjS7Y2X/wAe4E+HfVW4W0mX66 NdqAi7vaU78igeT6XpKhoMYUaYMDqowcye5xSmtA3iL08aPCihwERs2kZ3eBM9MN4xE4P00VkE UOA=
- Ironport-sdr: Qef6XNUMrxkBMSPHra2bqaro16Azc3D816zC9ONzV5IRXCMF8JHsRQlZK5z1tC94GZ84GnMsTv dP2qvGmIVinL9GkTSw679wkqo/EEYNc34IhdvThk/hqU8DVSpZvU0zqIswSvc2+RXy5cwfPEu4 evNYCeisTqb5RnskYIPh7M4HwUzFdWeYOrh+iwDSzsGzLyCm9xgy2WqKZas0RcsfrwoyNdNjS3 rUs3zyLW+qynRw28DkJcpzQB0qpIlpibDdqIw7tP3YfYINZ7c8qDHWt64zSyPUCLTyi/pgPpQO Yys=
- References: <cover.1567097252.git.alistair.francis@wdc.com> <871316fb87a99a59c31e6d3fbd4d35bff2ecc3c4.1567097252.git.alistair.francis@wdc.com>
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. If necessary we may use
the DIAG_* macros with appropriate comments about why the warning is a
false positive (sometimes other approaches work to avoid the warnings,
e.g. use of __builtin_unreachable () calls).
--
Joseph S. Myers
joseph@codesourcery.com