Let's revert the "avoid incorrect -Wmaybe-uninitialized warnings" patch.

--enable-gcc-warnings is designed for the default gcc -O2, and we shouldn't dumb down our source code for lesser platforms like "gcc -O0", or clang, or whatever.

For example, this patch:

-  int dest_desc;
-  int dest_errno;
+  int dest_desc IF_LINT ( = -1);
+  int dest_errno IF_LINT ( = 0);

means that we won't catch any programming errors caused by code failing to initialize dest_errno. That's a net minus to coreutils reliability. It's a *good* thing that dest_errno is not initialized here, and that GCC will complain if we use it uninitialized. We don't want to lose that good thing.

IF_LINT should be used sparingly: ideally only when gcc -O2 issues a false positive, and even then only after you've filed a bug report with the GCC maintainers because GCC is messing up.

The goal here is software reliability not pacifying compilers, and overuse of IF_LINT (such as the above) is a net minus to reliability.

Reply via email to