[RFC v5 01/21] sunrpc/clnt_udp: Ensure total_deadline is initalised
Joseph Myers
joseph@codesourcery.com
Thu Aug 29 17:22:00 GMT 2019
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
More information about the Libc-alpha
mailing list