twophase.c: In function ‘RecoverPreparedTransactions’: twophase.c:1916:9: warning: variable ‘overwriteOK’ set but not used [-Wunused-but-set-variable] bool overwriteOK = false; ^~~~~~~~~~~
As the message says, the value of overwriteOK is not used anywhere in RecoverPreparedTransactions:
bool overwriteOK = false;
/* * It's possible that SubTransSetParent has been set before, if * the prepared transaction generated xid assignment records. Test * here must match one used in AssignTransactionId(). */ if (InHotStandby && (hdr->nsubxacts >= PGPROC_MAX_CACHED_SUBXIDS || XLogLogicalInfoActive())) overwriteOK = true;