diff options
author | Nathan Bossart <nathan@postgresql.org> | 2024-12-09 16:26:23 -0600 |
---|---|---|
committer | Nathan Bossart <nathan@postgresql.org> | 2024-12-09 16:26:23 -0600 |
commit | 0fbcb9da181452e236b5aca6bf00c20ebcd7ec6b (patch) | |
tree | 7d1d7a636781ac9e1297d1a553eefbee2c82b7a4 /src | |
parent | a51ec088dbe54c41ecb3178053da8881d0e2452e (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/replication/logical/reorderbuffer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c index c7f8fa6216c..56c25e3a6da 100644 --- a/src/backend/replication/logical/reorderbuffer.c +++ b/src/backend/replication/logical/reorderbuffer.c @@ -2468,7 +2468,7 @@ ReorderBufferSerializeTXN(ReorderBuffer *rb, ReorderBufferTXN *txn) dlist_mutable_iter change_i; int fd = -1; XLogSegNo curOpenSegNo = 0; - Size spilled = 0; + Size spilled PG_USED_FOR_ASSERTS_ONLY = 0; elog(DEBUG2, "spill %u changes in XID %u to disk", (uint32) txn->nentries_mem, txn->xid); |