pgsql: Tweak PQresStatus() to avoid a clang compiler warning.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Tweak PQresStatus() to avoid a clang compiler warning.
Date: 2011-08-05 16:11:05
Message-ID: E1QpMzJ-0001a0-1j@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Tweak PQresStatus() to avoid a clang compiler warning.

The previous test for status < 0 test is in fact testing nothing if the
compiler considers an enum to be an unsigned data type. clang doesn't
like tautologies, so do this instead.

Report by Peter Geoghegan, fix as suggested by Tom Lane.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/b43bf617fdb3ecde709892c3bd8997ac41410f2f

Modified Files
--------------
src/interfaces/libpq/fe-exec.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2011-08-05 16:54:36 pgsql: Modestly improve pgbench's checking for invalid ranges.
Previous Message Bruce Momjian 2011-08-04 19:03:30 Re: pgsql: In documentaiton, clarify which commands have reduced WAL volume