From 307fa2ceb7ed68c39e30312c45848cda90225a84 Mon Sep 17 00:00:00 2001 From: Konstantin Knizhnik Date: Mon, 14 Apr 2025 12:45:13 +0300 Subject: [PATCH] Remove unused n_synced variable from HandleSafekeeperResponse (#11553) ## Problem clang produce warning about unused variable `n_synced` in HandleSafekeeperResponse ## Summary of changes Remove local variable. Co-authored-by: Konstantin Knizhnik --- pgxn/neon/walproposer.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pgxn/neon/walproposer.c b/pgxn/neon/walproposer.c index 6b133e4dc4..b95b1451e4 100644 --- a/pgxn/neon/walproposer.c +++ b/pgxn/neon/walproposer.c @@ -2118,9 +2118,6 @@ HandleSafekeeperResponse(WalProposer *wp, Safekeeper *fromsk) */ if (wp->config->syncSafekeepers) { - int n_synced; - - n_synced = 0; for (int i = 0; i < wp->n_safekeepers; i++) { Safekeeper *sk = &wp->safekeeper[i]; @@ -2129,8 +2126,6 @@ HandleSafekeeperResponse(WalProposer *wp, Safekeeper *fromsk) /* alive safekeeper which is not synced yet; wait for it */ if (sk->state != SS_OFFLINE && !synced) return; - if (synced) - n_synced++; } if (newCommitLsn >= wp->propTermStartLsn)