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


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