Version 1.19.1 compilation issue - RedHat Linux

Greg Hudson ghudson at mit.edu
Wed May 12 13:06:06 EDT 2021


On 5/12/21 8:17 AM, Vipul Mehta wrote:
> Getting following error:
> gic_keytab.c:185: error: ‘etype_list’ may be used uninitialized in this
> function

This is a false positive (etype_list can only be used uninitialized if
k5_canonprinc() returns zero candidates without erroring out, and it
doesn't do that).  But I will likely add an initializer for etype_list
as I think the function is clearer that way.

In general I found that maybe-uninitialized warnings are almost always
false positives and depend a lot on the compiler version, which is why I
attempted to turn them off.  Apparently that's not possible in that
particular version of gcc, without also turning off errors for
-Wuninitialized (which are much less likely to be false positives).

> At top level:
> cc1: warning: unrecognized command line option "-Wno-maybe-uninitialized"

> In config.log, i can see that configure script is not able to identify that
> the option is not supported as gcc gives warning instead of error:

Interesting.  More recent versions of gcc seem to silently ignore
unrecognized -Wno- flags, while clang continues to print a warning
rather than error.

This is a minor problem, but having a working test for -Wno- options
would be an improvement.

> It compiles fine if i remove "error=uninitialized" to allow uninitialized
> variables.
> Is it safe to compile without it ?

Yes.

> What is the version of gcc used to build and test MIT Kerberos in dev
> environment ?

At the moment, gcc 7.5.0 in my dev environment, plus whatever version of
gcc is on the Github Actions runners.


More information about the Kerberos mailing list