]> granicus.if.org Git - postgresql/commit
Fix some jsonb issues found by Coverity in recent commits.
authorAndrew Dunstan <andrew@dunslane.net>
Tue, 16 Dec 2014 15:32:06 +0000 (10:32 -0500)
committerAndrew Dunstan <andrew@dunslane.net>
Tue, 16 Dec 2014 15:32:06 +0000 (10:32 -0500)
commitc8315930e6a34b616d9840985c85eb0d856dd2df
tree55cccd7d95a0dd1f2bc79ac79b1c8d648f2433d7
parent4d65e16a6ff609701a8780d3cddbae02c6e20926
Fix some jsonb issues found by Coverity in recent commits.

Mostly these issues concern the non-use of function results. These
have been changed to use (void) pushJsonbValue(...) instead of assigning
the result to a variable that gets overwritten before it is used.

There is a larger issue that we should possibly examine the API for
pushJsonbValue(), so that instead of returning a value it modifies a
state argument. The current idiom is rather clumsy. However, changing
that requires quite a bit more work, so this change should do for the
moment.
src/backend/utils/adt/jsonb.c
src/backend/utils/adt/jsonfuncs.c