Re: Unused variables in hstore_to_jsonb

Lists: pgsql-hackers
From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Unused variables in hstore_to_jsonb
Date: 2015-01-13 07:34:36
Message-ID: CAB7nPqTar1F6sd-tbrBmW_Zm1d1H4nQrcQq-1c564TxLaK3EmA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

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

Attachment Content-Type Size
20150113_hstore_unused_vars.patch text/x-diff 1.4 KB

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Unused variables in hstore_to_jsonb
Date: 2015-01-13 07:39:10
Message-ID: CAB7nPqRu6HcWN8xY5kkJ1WF2JmDm6W9+nu9zbGg8iqRUppBSgg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Tue, Jan 13, 2015 at 4:34 PM, Michael Paquier
<michael(dot)paquier(at)gmail(dot)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

Attachment Content-Type Size
20150113_hstore_unused_vars_v2.patch text/x-diff 2.7 KB

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Unused variables in hstore_to_jsonb
Date: 2015-01-13 08:36:28
Message-ID: 54B4D90C.10006@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 01/13/2015 09:39 AM, Michael Paquier wrote:
> On Tue, Jan 13, 2015 at 4:34 PM, Michael Paquier
> <michael(dot)paquier(at)gmail(dot)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


From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Unused variables in hstore_to_jsonb
Date: 2015-01-13 11:09:03
Message-ID: CAB7nPqQfX3RvAQs8Gku373-qms-H8_AM-1Z=ypmijH-F+h2=RA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Tue, Jan 13, 2015 at 5:36 PM, Heikki Linnakangas
<hlinnakangas(at)vmware(dot)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

Attachment Content-Type Size
20150113_hstore_unused_vars_v3.patch text/x-patch 2.7 KB

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Unused variables in hstore_to_jsonb
Date: 2015-01-13 12:33:38
Message-ID: 54B510A2.2020402@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 01/13/2015 01:09 PM, Michael Paquier wrote:
> On Tue, Jan 13, 2015 at 5:36 PM, Heikki Linnakangas
> <hlinnakangas(at)vmware(dot)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