From 98768ccc3ca908c63fd10f1637d4a691f952b077 Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Wed, 14 Jan 2015 18:19:11 +0200 Subject: [PATCH] Silence compiler warnings about variables being used uninitialized. --- connection.c | 2 +- loadlib.c | 2 +- statement.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/connection.c b/connection.c index 00c32a2..cfe0689 100644 --- a/connection.c +++ b/connection.c @@ -1763,7 +1763,7 @@ CC_send_query_append(ConnectionClass *self, const char *query, QueryInfo *qi, UD /* QR_set_command() dups this string so doesn't need static */ char *cmdbuffer; BOOL reduce_round_trip_time = !(flag & IGNORE_ROUND_TRIP); - PGresult *pgres; + PGresult *pgres = NULL; notice_receiver_arg nrarg; if (appendq) diff --git a/loadlib.c b/loadlib.c index 1484035..a1bf01e 100644 --- a/loadlib.c +++ b/loadlib.c @@ -220,7 +220,7 @@ RETCODE CALL_IsolateDtcConn(ConnectionClass *conn, BOOL continueConnection) void *CALL_GetTransactionObject(HRESULT *hres) { - void *ret; + void *ret = NULL; BOOL loaded = TRUE; #if defined(_MSC_DELAY_LOAD_IMPORT) diff --git a/statement.c b/statement.c index e1a5ea8..106e968 100644 --- a/statement.c +++ b/statement.c @@ -2467,7 +2467,7 @@ libpq_bind_and_exec(StatementClass *stmt, const char *plan_name, PGresult *pgres = NULL; int pgresstatus; QResultClass *newres = NULL; - QResultClass *res; + QResultClass *res = NULL; char *cmdtag; char *rowcount; BOOL ret = FALSE; -- 2.39.5