hba.c:3160:18: warning: comparison of unsigned enum expression

Erik Rijkers <er@xs4all.nl>

From: Erik Rijkers <er@xs4all.nl>
To: "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2021-04-07T11:00:48Z
Lists: pgsql-hackers
Recently (last day or so), I get this warning from gcc 10.2:

-----
hba.c:3160:18: warning: comparison of unsigned enum expression < 0 is always false [-Wtautological-compare]
        if (auth_method < 0 || USER_AUTH_LAST < auth_method)
            ~~~~~~~~~~~ ^ ~
1 warning generated.
-----

Erik



Commits

  1. Refactor hba_authname

  2. Add some information about authenticated identity via log_connections