Warning in pg_backup_archiver.c

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Warning in pg_backup_archiver.c
Date: 2014-02-21 07:27:53
Message-ID: CAB7nPqRi-2e3h8V0J4ZxK1Fcnjtt4Kg99Nm+D_qZtcsZtiPsSg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

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.
Regards,
--
Michael

Attachment Content-Type Size
20140221_pg_dump_warning.patch text/x-patch 746 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Etsuro Fujita 2014-02-21 07:33:32 Re: inherit support for foreign tables
Previous Message Kyotaro HORIGUCHI 2014-02-21 07:03:34 Re: inherit support for foreign tables