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

2021-04-07 Thread Michael Paquier
On Wed, Apr 07, 2021 at 02:20:25PM +0200, Magnus Hagander wrote: > Ok, I'll go ahead and push it. Thanks for confirming the fix! Cool. Thanks! -- Michael signature.asc Description: PGP signature

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

2021-04-07 Thread Magnus Hagander
On Wed, Apr 7, 2021 at 2:17 PM Michael Paquier wrote: > > On Wed, Apr 07, 2021 at 02:01:42PM +0200, Magnus Hagander wrote: > > That's very close to mine (see one email later). Let's bikeshed about > > the details. I think it's basically the same for current usecases, but > > that taking the UserAu

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

2021-04-07 Thread Erik Rijkers
> On 2021.04.07. 13:57 Michael Paquier wrote: > > > On Wed, Apr 07, 2021 at 01:24:01PM +0200, Magnus Hagander wrote: > > On Wed, Apr 7, 2021 at 1:01 PM Erik Rijkers wrote: > > > Recently (last day or so), I get this warning from gcc 10.2: > [gcc-hba-warning.patch] FWIW, this fixes the warnin

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

2021-04-07 Thread Michael Paquier
On Wed, Apr 07, 2021 at 02:01:42PM +0200, Magnus Hagander wrote: > That's very close to mine (see one email later). Let's bikeshed about > the details. I think it's basically the same for current usecases, but > that taking the UserAuth as the parameter is cleaner and potentially > more useful for

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

2021-04-07 Thread Magnus Hagander
On Wed, Apr 7, 2021 at 1:57 PM Michael Paquier wrote: > > On Wed, Apr 07, 2021 at 01:24:01PM +0200, Magnus Hagander wrote: > > On Wed, Apr 7, 2021 at 1:01 PM Erik Rijkers wrote: > > > Recently (last day or so), I get this warning from gcc 10.2: > > Same compiler version here, but I did not get wa

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

2021-04-07 Thread Michael Paquier
On Wed, Apr 07, 2021 at 01:24:01PM +0200, Magnus Hagander wrote: > On Wed, Apr 7, 2021 at 1:01 PM Erik Rijkers wrote: > > Recently (last day or so), I get this warning from gcc 10.2: Same compiler version here, but I did not get warned. Are you using any particular flag? > But that also highlig

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

2021-04-07 Thread Magnus Hagander
On Wed, Apr 7, 2021 at 1:24 PM Magnus Hagander wrote: > > On Wed, Apr 7, 2021 at 1:01 PM Erik Rijkers wrote: > > > > 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 [-Wtautologic

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

2021-04-07 Thread Magnus Hagander
On Wed, Apr 7, 2021 at 1:01 PM Erik Rijkers wrote: > > 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_meth