From: Heikki Linnakangas Date: Tue, 13 Jan 2015 12:29:36 +0000 (+0200) Subject: Silence Coverity warnings about unused return values from pushJsonbValue() X-Git-Tag: REL9_4_1~47 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4ebb3494e9e05308737d27ee422b2283631f43a2;p=postgresql Silence Coverity warnings about unused return values from pushJsonbValue() Similar warnings from backend were silenced earlier by commit c8315930, but there were a few more contrib/hstore. Michael Paquier --- diff --git a/contrib/hstore/hstore_io.c b/contrib/hstore/hstore_io.c index cd01b2fadd..079f662748 100644 --- a/contrib/hstore/hstore_io.c +++ b/contrib/hstore/hstore_io.c @@ -1338,7 +1338,7 @@ hstore_to_jsonb(PG_FUNCTION_ARGS) JsonbParseState *state = NULL; JsonbValue *res; - res = pushJsonbValue(&state, WJB_BEGIN_OBJECT, NULL); + (void) pushJsonbValue(&state, WJB_BEGIN_OBJECT, NULL); for (i = 0; i < count; i++) { @@ -1349,7 +1349,7 @@ hstore_to_jsonb(PG_FUNCTION_ARGS) key.val.string.len = HS_KEYLEN(entries, i); key.val.string.val = HS_KEY(entries, base, i); - res = pushJsonbValue(&state, WJB_KEY, &key); + (void) pushJsonbValue(&state, WJB_KEY, &key); if (HS_VALISNULL(entries, i)) { @@ -1361,7 +1361,7 @@ hstore_to_jsonb(PG_FUNCTION_ARGS) val.val.string.len = HS_VALLEN(entries, i); val.val.string.val = HS_VAL(entries, base, i); } - res = pushJsonbValue(&state, WJB_VALUE, &val); + (void) pushJsonbValue(&state, WJB_VALUE, &val); } res = pushJsonbValue(&state, WJB_END_OBJECT, NULL); @@ -1385,7 +1385,7 @@ hstore_to_jsonb_loose(PG_FUNCTION_ARGS) initStringInfo(&tmp); - res = pushJsonbValue(&state, WJB_BEGIN_OBJECT, NULL); + (void) pushJsonbValue(&state, WJB_BEGIN_OBJECT, NULL); for (i = 0; i < count; i++) { @@ -1396,7 +1396,7 @@ hstore_to_jsonb_loose(PG_FUNCTION_ARGS) key.val.string.len = HS_KEYLEN(entries, i); key.val.string.val = HS_KEY(entries, base, i); - res = pushJsonbValue(&state, WJB_KEY, &key); + (void) pushJsonbValue(&state, WJB_KEY, &key); if (HS_VALISNULL(entries, i)) { @@ -1471,7 +1471,7 @@ hstore_to_jsonb_loose(PG_FUNCTION_ARGS) val.val.string.val = HS_VAL(entries, base, i); } } - res = pushJsonbValue(&state, WJB_VALUE, &val); + (void) pushJsonbValue(&state, WJB_VALUE, &val); } res = pushJsonbValue(&state, WJB_END_OBJECT, NULL);