Re: Warning in pg_backup_archiver.c - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: Warning in pg_backup_archiver.c
Date
Msg-id 20140221162547.GH2921@tamriel.snowman.net
Whole thread Raw
In response to Warning in pg_backup_archiver.c  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
Michael,

* Michael Paquier (michael.paquier@gmail.com) wrote:
> While compiling on clang, I noticed the following warning:
> pg_backup_archiver.c:1950:32: warning: comparison of constant -1 with
> expression of type 'ArchiveFormat' (aka 'enum _archiveFormat') is always
> false
>       [-Wtautological-constant-out-of-range-compare]
>                 if ((AH->format = fgetc(fh)) == EOF)
>                     ~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~
> Something like the patch attached calms down the compiler... This has been
> introduced recently by commit cfa1b4a of the 9th of February.

I've got a patch for this already, but it's included in a bunch of other
minor cleanup stuff that I'm still playing with.  I hope to commit it
this weekend.
Thanks,
    Stephen

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Storing the password in .pgpass file in an encrypted format
Next
From: Craig Ringer
Date:
Subject: Re: Uninterruptable regexp_replace in 9.3.1 ?