Re: hba.c:3160:18: warning: comparison of unsigned enum expression - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: hba.c:3160:18: warning: comparison of unsigned enum expression
Date
Msg-id YG2eD/tA+bBZHGm0@paquier.xyz
Whole thread Raw
In response to Re: hba.c:3160:18: warning: comparison of unsigned enum expression  (Magnus Hagander <magnus@hagander.net>)
Responses Re: hba.c:3160:18: warning: comparison of unsigned enum expression
Re: hba.c:3160:18: warning: comparison of unsigned enum expression
List pgsql-hackers
On Wed, Apr 07, 2021 at 01:24:01PM +0200, Magnus Hagander wrote:
> On Wed, Apr 7, 2021 at 1:01 PM Erik Rijkers <er@xs4all.nl> 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 highlights -- shouldn't that function then also be made
> to use hba_authname(), and the assert moved into the function? That
> seems like the cleanest way?

Good idea, that's much cleaner this way.  Do you like the attached?
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Yet another fast GiST build
Next
From: Magnus Hagander
Date:
Subject: Re: hba.c:3160:18: warning: comparison of unsigned enum expression