From 6e3b17b5b918d451b13ed52be8f27b2e4479bf9c Mon Sep 17 00:00:00 2001 From: kanoi Date: Fri, 22 Aug 2014 23:22:03 +1000 Subject: [PATCH] ckdb - remove gcc warnings --- src/ckdb.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/ckdb.c b/src/ckdb.c index 15218d8e..7028c9f8 100644 --- a/src/ckdb.c +++ b/src/ckdb.c @@ -3973,7 +3973,7 @@ static bool _sharesummary_update(PGconn *conn, SHARES *s_row, SHAREERRORS *e_row char *ins, *upd; bool ok = false, new; char *params[19 + MODIFYDATECOUNT]; - int n, par; + int n, par = 0; int64_t userid, workinfoid; char *workername; tv_t *sharecreatedate; @@ -7169,6 +7169,10 @@ wiconf: return NULL; } + i_nonce = require_name(trf_root, "nonce", 1, NULL, reply, siz); + if (!i_nonce) + return strdup(reply); + i_workinfoid = require_name(trf_root, "workinfoid", 1, NULL, reply, siz); if (!i_workinfoid) return strdup(reply); @@ -7201,10 +7205,6 @@ wiconf: if (!i_nonce2) return strdup(reply); - i_nonce = require_name(trf_root, "nonce", 1, NULL, reply, siz); - if (!i_nonce) - return strdup(reply); - i_diff = require_name(trf_root, "diff", 1, NULL, reply, siz); if (!i_diff) return strdup(reply); @@ -7248,6 +7248,10 @@ sconf: return NULL; } + i_username = require_name(trf_root, "username", 1, NULL, reply, siz); + if (!i_username) + return strdup(reply); + i_workinfoid = require_name(trf_root, "workinfoid", 1, NULL, reply, siz); if (!i_workinfoid) return strdup(reply); @@ -7260,10 +7264,6 @@ sconf: goto seconf; } - i_username = require_name(trf_root, "username", 1, NULL, reply, siz); - if (!i_username) - return strdup(reply); - i_workername = require_name(trf_root, "workername", 1, NULL, reply, siz); if (!i_workername) return strdup(reply);