Hi all,
Coverity is pointing out that a couple of return value checks are missing for JsonbIteratorNext in jsonfuncs.c. Patch is attached to append (void) to them, as far as I am guessing we want skip the value iterated on. Regards, -- Michael
diff --git a/src/backend/utils/adt/jsonfuncs.c b/src/backend/utils/adt/jsonfuncs.c index 13d5b7a..b4258d8 100644 --- a/src/backend/utils/adt/jsonfuncs.c +++ b/src/backend/utils/adt/jsonfuncs.c @@ -3362,8 +3362,7 @@ jsonb_delete(PG_FUNCTION_ARGS) { /* skip corresponding value as well */ if (r == WJB_KEY) - JsonbIteratorNext(&it, &v, true); - + (void) JsonbIteratorNext(&it, &v, true); continue; } @@ -3436,7 +3435,7 @@ jsonb_delete_idx(PG_FUNCTION_ARGS) if (i++ == idx) { if (r == WJB_KEY) - JsonbIteratorNext(&it, &v, true); /* skip value */ + (void) JsonbIteratorNext(&it, &v, true); /* skip value */ continue; } }
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers