pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Use pg_assume() to avoid compiler warning below exec_set_found()
Date: Wed, 09 Jul 2025 23:20:25 +0000
Message-ID: <E1uZe5R-005Ukb-1k@gemulon.postgresql.org> (raw)

Use pg_assume() to avoid compiler warning below exec_set_found()

The warning, visible when building with -O3 and a recent-ish gcc, is due to
gcc not realizing that found is a byvalue type and therefore will never be
interpreted as a varlena type.

Discussion: https://postgr.es/m/3prdb6hkep3duglhsujrn52bkvnlkvhc54fzvph2emrsm4vodl@77yy6j4hkemb
Discussion: https://postgr.es/m/20230316172818.x6375uvheom3ibt2%40awork3.anarazel.de
Discussion: https://postgr.es/m/20240207203138.sknifhlppdtgtxnk%40awork3.anarazel.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/48a23f6eae710d2c5c29f38e66d76e7919117e4d

Modified Files
--------------
src/pl/plpgsql/src/pl_exec.c | 9 +++++++++
1 file changed, 9 insertions(+)



Message-ID: <E1uZe5R-005Ukb-1k@gemulon.postgresql.org>
Permalink:  ../E1uZe5R-005Ukb-1k@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1uZe5R-005Ukb-1k@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: andres@anarazel.de, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Use pg_assume() to avoid compiler warning below exec_set_found()
  In-Reply-To: <E1uZe5R-005Ukb-1k@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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