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

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Use pg_assume() to avoid compiler warning below exec_set_found()
Date: 2025-07-09 23:20:25
Message-ID: E1uZe5R-005Ukb-1k@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2025-07-10 01:13:16 pgsql: injection_points: Add injection_points_list()
Previous Message Tom Lane 2025-07-09 18:21:16 pgsql: Link libpq with libdl if the platform needs that.