pgsql: Fix unused-but-set-variable compiler warning in reorderbuffer.c.

From: Nathan Bossart <nathan(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix unused-but-set-variable compiler warning in reorderbuffer.c.
Date: 2024-12-09 22:26:39
Message-ID: E1tKmD8-001wOD-Vl@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix unused-but-set-variable compiler warning in reorderbuffer.c.

On v13, this variable is only used for an assertion, so adding
PG_USED_FOR_ASSERTS_ONLY is sufficient to suppress this warning on
builds with assertions disabled. Older versions are unsupported,
and newer versions use the variable for more than the assertion, so
this patch only needs to be applied to REL_13_STABLE.

Reviewed-by: Tom Lane
Discussion: https://postgr.es/m/Z1dCFnzrP24O8WNR%40nathan

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/0fbcb9da181452e236b5aca6bf00c20ebcd7ec6b

Modified Files
--------------
src/backend/replication/logical/reorderbuffer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2024-12-10 03:55:05 pgsql: Fix outdated comment of scram_build_secret()
Previous Message Masahiko Sawada 2024-12-09 21:07:46 pgsql: Include necessary header files in radixtree.h.