pgsql: In jsonb_plpython.c, suppress warning message from gcc 10. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: In jsonb_plpython.c, suppress warning message from gcc 10.
Date
Msg-id E1ixJCh-0002Ck-Ik@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
In jsonb_plpython.c, suppress warning message from gcc 10.

Very recent gcc complains that PLyObject_ToJsonbValue could return
a pointer to a local variable.  I think it's wrong; but the coding
is fragile enough, and the savings of one palloc() minimal enough,
that it seems better to just do a palloc() all the time.  (My other
idea of tweaking the if-condition doesn't suppress the warning.)

Back-patch to v11 where this code was introduced.

Discussion: https://postgr.es/m/21547.1580170366@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/a069218163704c44a8996e7e98e765c56e2b9c8e

Modified Files
--------------
contrib/jsonb_plpython/jsonb_plpython.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)


pgsql-committers by date:

Previous
From: Thomas Munro
Date:
Subject: pgsql: Handle lack of DSM slots in parallel btree build.
Next
From: Thomas Munro
Date:
Subject: pgsql: Adjust DSM and DSA slot usage constants.