File tree Expand file tree Collapse file tree 3 files changed +16
-19
lines changed Expand file tree Collapse file tree 3 files changed +16
-19
lines changed Original file line number Diff line number Diff line change @@ -207,8 +207,6 @@ autoprewarm_main(Datum main_arg)
207207 /* Periodically dump buffers until terminated. */
208208 while (!got_sigterm )
209209 {
210- int rc ;
211-
212210 /* In case of a SIGHUP, just reload the configuration. */
213211 if (got_sighup )
214212 {
@@ -219,10 +217,10 @@ autoprewarm_main(Datum main_arg)
219217 if (autoprewarm_interval <= 0 )
220218 {
221219 /* We're only dumping at shutdown, so just wait forever. */
222- rc = WaitLatch (& MyProc -> procLatch ,
223- WL_LATCH_SET | WL_EXIT_ON_PM_DEATH ,
224- -1L ,
225- PG_WAIT_EXTENSION );
220+ ( void ) WaitLatch (& MyProc -> procLatch ,
221+ WL_LATCH_SET | WL_EXIT_ON_PM_DEATH ,
222+ -1L ,
223+ PG_WAIT_EXTENSION );
226224 }
227225 else
228226 {
@@ -248,10 +246,10 @@ autoprewarm_main(Datum main_arg)
248246 }
249247
250248 /* Sleep until the next dump time. */
251- rc = WaitLatch (& MyProc -> procLatch ,
252- WL_LATCH_SET | WL_TIMEOUT | WL_EXIT_ON_PM_DEATH ,
253- delay_in_ms ,
254- PG_WAIT_EXTENSION );
249+ ( void ) WaitLatch (& MyProc -> procLatch ,
250+ WL_LATCH_SET | WL_TIMEOUT | WL_EXIT_ON_PM_DEATH ,
251+ delay_in_ms ,
252+ PG_WAIT_EXTENSION );
255253 }
256254
257255 /* Reset the latch, loop. */
Original file line number Diff line number Diff line change @@ -361,10 +361,10 @@ BackgroundWriterMain(void)
361361 /* Ask for notification at next buffer allocation */
362362 StrategyNotifyBgWriter (MyProc -> pgprocno );
363363 /* Sleep ... */
364- rc = WaitLatch (MyLatch ,
365- WL_LATCH_SET | WL_TIMEOUT | WL_EXIT_ON_PM_DEATH ,
366- BgWriterDelay * HIBERNATE_FACTOR ,
367- WAIT_EVENT_BGWRITER_HIBERNATE );
364+ ( void ) WaitLatch (MyLatch ,
365+ WL_LATCH_SET | WL_TIMEOUT | WL_EXIT_ON_PM_DEATH ,
366+ BgWriterDelay * HIBERNATE_FACTOR ,
367+ WAIT_EVENT_BGWRITER_HIBERNATE );
368368 /* Reset the notification request in case we timed out */
369369 StrategyNotifyBgWriter (-1 );
370370 }
Original file line number Diff line number Diff line change @@ -217,18 +217,17 @@ worker_spi_main(Datum main_arg)
217217 while (!got_sigterm )
218218 {
219219 int ret ;
220- int rc ;
221220
222221 /*
223222 * Background workers mustn't call usleep() or any direct equivalent:
224223 * instead, they may wait on their process latch, which sleeps as
225224 * necessary, but is awakened if postmaster dies. That way the
226225 * background process goes away immediately in an emergency.
227226 */
228- rc = WaitLatch (MyLatch ,
229- WL_LATCH_SET | WL_TIMEOUT | WL_EXIT_ON_PM_DEATH ,
230- worker_spi_naptime * 1000L ,
231- PG_WAIT_EXTENSION );
227+ ( void ) WaitLatch (MyLatch ,
228+ WL_LATCH_SET | WL_TIMEOUT | WL_EXIT_ON_PM_DEATH ,
229+ worker_spi_naptime * 1000L ,
230+ PG_WAIT_EXTENSION );
232231 ResetLatch (MyLatch );
233232
234233 CHECK_FOR_INTERRUPTS ();
You can’t perform that action at this time.
0 commit comments