coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nstrftime.c fails to build due to memset overflow


From: William Bader
Subject: Re: nstrftime.c fails to build due to memset overflow
Date: Thu, 16 Mar 2023 04:56:10 +0000

> The goal should not be to pacify compilers' false alarms. The goal should be 
> to have code that works correctly, is easy to understand, is efficient, etc.

In my personal code, when gcc complains about an uninitialized variable, even 
if the code is correct, I usually either add an initialization or restructure 
the code.

If the control flow is complicated enough that gcc can't follow it, usually the 
code takes some effort to understand, debugging in the future could waste time 
verifying that the variable is initialized in all flow paths, and changes to 
the code could accidentally create flow paths that leave the variable 
uninitialized.

William


reply via email to

[Prev in Thread] Current Thread [Next in Thread]