Unused variables in hstore_to_jsonb

Started by Michael Paquierover 11 years ago5 messageshackers
Jump to latest
#1Michael Paquier
michael@paquier.xyz

Hi all,

Coverity pointed out that hstore_to_jsonb in hstore_io.c does not use
a couple of return values from pushJsonbValue.
Attached is a patch to fix that.
Regards,
--
Michael

Attachments:

20150113_hstore_unused_vars.patchtext/x-diff; charset=US-ASCII; name=20150113_hstore_unused_vars.patchDownload+6-6
#2Michael Paquier
michael@paquier.xyz
In reply to: Michael Paquier (#1)
Re: Unused variables in hstore_to_jsonb

On Tue, Jan 13, 2015 at 4:34 PM, Michael Paquier
<michael.paquier@gmail.com> wrote:

Attached is a patch to fix that.

Oh, actually that's as well the case of hstore_to_jsonb_loose. Updated
patch is attached.
--
Michael

Attachments:

20150113_hstore_unused_vars_v2.patchtext/x-diff; charset=US-ASCII; name=20150113_hstore_unused_vars_v2.patchDownload+12-12
#3Heikki Linnakangas
heikki.linnakangas@enterprisedb.com
In reply to: Michael Paquier (#2)
Re: Unused variables in hstore_to_jsonb

On 01/13/2015 09:39 AM, Michael Paquier wrote:

On Tue, Jan 13, 2015 at 4:34 PM, Michael Paquier
<michael.paquier@gmail.com> wrote:

Attached is a patch to fix that.

Oh, actually that's as well the case of hstore_to_jsonb_loose. Updated
patch is attached.

You'll need to use "(void) pushJsonbValue(...)", otherwise you'll just
get a different warning. See commit c8315930.

- Heikki

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#4Michael Paquier
michael@paquier.xyz
In reply to: Heikki Linnakangas (#3)
Re: Unused variables in hstore_to_jsonb

On Tue, Jan 13, 2015 at 5:36 PM, Heikki Linnakangas
<hlinnakangas@vmware.com> wrote:

You'll need to use "(void) pushJsonbValue(...)", otherwise you'll just get a
different warning. See commit c8315930.

Oh, I see. So this portion in contrib/ has been visibly missing.
Attached is a new patch.
--
Michael

Attachments:

20150113_hstore_unused_vars_v3.patchtext/x-patch; charset=US-ASCII; name=20150113_hstore_unused_vars_v3.patchDownload+12-12
#5Heikki Linnakangas
heikki.linnakangas@enterprisedb.com
In reply to: Michael Paquier (#4)
Re: Unused variables in hstore_to_jsonb

On 01/13/2015 01:09 PM, Michael Paquier wrote:

On Tue, Jan 13, 2015 at 5:36 PM, Heikki Linnakangas
<hlinnakangas@vmware.com> wrote:

You'll need to use "(void) pushJsonbValue(...)", otherwise you'll just get a
different warning. See commit c8315930.

Oh, I see. So this portion in contrib/ has been visibly missing.
Attached is a new patch.

Thanks, committed.

- Heikki

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers