Re: Warning in pg_backup_archiver.c

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Warning in pg_backup_archiver.c
Date: 2014-02-21 16:25:47
Message-ID: 20140221162547.GH2921@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Michael,

* Michael Paquier (michael(dot)paquier(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2014-02-21 16:29:33 Re: Uninterruptable regexp_replace in 9.3.1 ?
Previous Message Alvaro Herrera 2014-02-21 16:20:00 Re: Storing the password in .pgpass file in an encrypted format