summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2017-02-17 16:58:26 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2017-02-17 16:58:59 -0500
commite9e2bde2d29ceed3817434b85a4dfef84fb25556 (patch)
treedebaf7773627717f494195a8b17adf686b2d10ef /src
parent6b77a0e125897fd3b5c553017a060735803e580e (diff)
Back-patch 9.4-era compiler warning fixes into older branches.
This applies portions of commits b64b5ccb6 and b1aebbb6a to the older branches, in hopes of getting -Werror builds to succeed there. The applied changes simply remove useless tests, eg checking an unsigned variable to see if it is >= 0. Recent versions of clang warn about such tests by default.
Diffstat (limited to 'src')
-rw-r--r--src/interfaces/libpq/fe-exec.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/interfaces/libpq/fe-exec.c b/src/interfaces/libpq/fe-exec.c
index a5ea452d8d7..6be86dcf695 100644
--- a/src/interfaces/libpq/fe-exec.c
+++ b/src/interfaces/libpq/fe-exec.c
@@ -2897,7 +2897,7 @@ PQoidStatus(const PGresult *res)
size_t len;
- if (!res || !res->cmdStatus || strncmp(res->cmdStatus, "INSERT ", 7) != 0)
+ if (!res || strncmp(res->cmdStatus, "INSERT ", 7) != 0)
return "";
len = strspn(res->cmdStatus + 7, "0123456789");
@@ -2921,7 +2921,6 @@ PQoidValue(const PGresult *res)
unsigned long result;
if (!res ||
- !res->cmdStatus ||
strncmp(res->cmdStatus, "INSERT ", 7) != 0 ||
res->cmdStatus[7] < '0' ||
res->cmdStatus[7] > '9')