pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: In jsonb_plpython.c, suppress warning message from gcc 10. 3+ messages / 1 participants [nested] [flat]
* pgsql: In jsonb_plpython.c, suppress warning message from gcc 10. @ 2020-01-30 23:26 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 3+ messages in thread From: Tom Lane @ 2020-01-30 23:26 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: In jsonb_plpython.c, suppress warning message from gcc 10. @ 2020-01-30 23:26 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 3+ messages in thread From: Tom Lane @ 2020-01-30 23:26 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/a4484a6489291d3160767d57ab538f1de6698c21 Modified Files -------------- contrib/jsonb_plpython/jsonb_plpython.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: In jsonb_plpython.c, suppress warning message from gcc 10. @ 2020-01-30 23:26 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 3+ messages in thread From: Tom Lane @ 2020-01-30 23:26 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/39428be9ce8f4fa124ad6207e18e57c6c2478316 Modified Files -------------- contrib/jsonb_plpython/jsonb_plpython.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2020-01-30 23:26 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2020-01-30 23:26 pgsql: In jsonb_plpython.c, suppress warning message from gcc 10. Tom Lane <tgl@sss.pgh.pa.us> 2020-01-30 23:26 pgsql: In jsonb_plpython.c, suppress warning message from gcc 10. Tom Lane <tgl@sss.pgh.pa.us> 2020-01-30 23:26 pgsql: In jsonb_plpython.c, suppress warning message from gcc 10. Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox