aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>1999-12-20 01:31:26 +0000
committerTom Lane <tgl@sss.pgh.pa.us>1999-12-20 01:31:26 +0000
commit80dc7e207aa6db75ce7f0d40afbb1a99eb30988e (patch)
tree03e1158db0dc0f7de85a62a761b2524d8f150e96 /src
parent939229904a78c16187106461ee6e83755d3aeb3b (diff)
downloadpostgresql-80dc7e207aa6db75ce7f0d40afbb1a99eb30988e.tar.gz
postgresql-80dc7e207aa6db75ce7f0d40afbb1a99eb30988e.zip
Clean up some minor gcc warnings. I'm not touching the
major one, though, which is the truly ugly stores into libpq private storage. Can't you find a better way to do this?
Diffstat (limited to 'src')
-rw-r--r--src/interfaces/libpgeasy/libpgeasy.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/interfaces/libpgeasy/libpgeasy.c b/src/interfaces/libpgeasy/libpgeasy.c
index b067466c1a6..c2efe034c4a 100644
--- a/src/interfaces/libpgeasy/libpgeasy.c
+++ b/src/interfaces/libpgeasy/libpgeasy.c
@@ -30,8 +30,8 @@ static PGresult *res = NULL;
static int on_error_state = ON_ERROR_STOP;
-static in_result_block = FALSE;
-static was_get_unset_result = FALSE;
+static int in_result_block = FALSE;
+static int was_get_unset_result = FALSE;
/* LOCAL VARIABLES */
static int tuple;
@@ -214,6 +214,7 @@ get_result()
was_get_unset_result = TRUE;
/* we have to store the fetch location somewhere */
+ /* XXX THIS IS A NO-NO */
cmdstatus[0] = NUL;
memcpy(&cmdstatus[1], &tuple, sizeof(tuple));
@@ -235,13 +236,16 @@ set_result(PGresult *newres)
halt("set_result called with null result pointer\n");
if (res != NULL && was_get_unset_result == FALSE)
+ {
if (in_result_block == FALSE)
PQclear(res);
else
{
+ /* XXX THIS IS A NO-NO */
cmdstatus[0] = NUL;
memcpy(&cmdstatus[1], &tuple, sizeof(tuple));
}
+ }
in_result_block = TRUE;
was_get_unset_result = FALSE;
@@ -270,6 +274,8 @@ unset_result(PGresult *oldres)
halt("Unset of result without being set.\n");
was_get_unset_result = TRUE;
+
+ /* XXX THIS IS A NO-NO */
cmdstatus[0] = NUL;
memcpy(&cmdstatus[1], &tuple, sizeof(tuple));
in_result_block = FALSE;