[HACKERS] warning in twophase.c - Mailing list pgsql-hackers

From Amit Langote
Subject [HACKERS] warning in twophase.c
Date
Msg-id f20ac2ed-65a9-6511-e100-8fa369184603@lab.ntt.co.jp
Whole thread Raw
Responses Re: [HACKERS] warning in twophase.c  (Jeevan Ladhe <jeevan.ladhe@enterprisedb.com>)
List pgsql-hackers
Been seeing this warning recently:

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
generatedxid assignment records. Test        * here must match one used in AssignTransactionId().        */       if
(InHotStandby&& (hdr->nsubxacts >= PGPROC_MAX_CACHED_SUBXIDS ||                            XLogLogicalInfoActive()))
      overwriteOK = true;
 

Couldn't we get rid of it?

Thanks,
Amit




pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: [HACKERS] Adding support for Default partition in partitioning
Next
From: Noah Misch
Date:
Subject: Re: [HACKERS] PG_GETARG_GISTENTRY?