mirror of
https://github.com/postgres/postgres.git
synced 2025-05-21 00:02:53 -04:00
Silence compiler warnings
Commit cfdf4dc4fc96 left a few unnecessary assignments, one of which caused compiler warnings, as reported by Erik Rijkers. Remove them all. Discussion: https://postgr.es/m/df0dcca2025b3d90d946ecc508ca9678@xs4all.nl
This commit is contained in:
parent
0f75a466ac
commit
3be5fe2b10
@ -207,8 +207,6 @@ autoprewarm_main(Datum main_arg)
|
|||||||
/* Periodically dump buffers until terminated. */
|
/* Periodically dump buffers until terminated. */
|
||||||
while (!got_sigterm)
|
while (!got_sigterm)
|
||||||
{
|
{
|
||||||
int rc;
|
|
||||||
|
|
||||||
/* In case of a SIGHUP, just reload the configuration. */
|
/* In case of a SIGHUP, just reload the configuration. */
|
||||||
if (got_sighup)
|
if (got_sighup)
|
||||||
{
|
{
|
||||||
@ -219,10 +217,10 @@ autoprewarm_main(Datum main_arg)
|
|||||||
if (autoprewarm_interval <= 0)
|
if (autoprewarm_interval <= 0)
|
||||||
{
|
{
|
||||||
/* We're only dumping at shutdown, so just wait forever. */
|
/* We're only dumping at shutdown, so just wait forever. */
|
||||||
rc = WaitLatch(&MyProc->procLatch,
|
(void) WaitLatch(&MyProc->procLatch,
|
||||||
WL_LATCH_SET | WL_EXIT_ON_PM_DEATH,
|
WL_LATCH_SET | WL_EXIT_ON_PM_DEATH,
|
||||||
-1L,
|
-1L,
|
||||||
PG_WAIT_EXTENSION);
|
PG_WAIT_EXTENSION);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -248,10 +246,10 @@ autoprewarm_main(Datum main_arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Sleep until the next dump time. */
|
/* Sleep until the next dump time. */
|
||||||
rc = WaitLatch(&MyProc->procLatch,
|
(void) WaitLatch(&MyProc->procLatch,
|
||||||
WL_LATCH_SET | WL_TIMEOUT | WL_EXIT_ON_PM_DEATH,
|
WL_LATCH_SET | WL_TIMEOUT | WL_EXIT_ON_PM_DEATH,
|
||||||
delay_in_ms,
|
delay_in_ms,
|
||||||
PG_WAIT_EXTENSION);
|
PG_WAIT_EXTENSION);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Reset the latch, loop. */
|
/* Reset the latch, loop. */
|
||||||
|
@ -361,10 +361,10 @@ BackgroundWriterMain(void)
|
|||||||
/* Ask for notification at next buffer allocation */
|
/* Ask for notification at next buffer allocation */
|
||||||
StrategyNotifyBgWriter(MyProc->pgprocno);
|
StrategyNotifyBgWriter(MyProc->pgprocno);
|
||||||
/* Sleep ... */
|
/* Sleep ... */
|
||||||
rc = WaitLatch(MyLatch,
|
(void) WaitLatch(MyLatch,
|
||||||
WL_LATCH_SET | WL_TIMEOUT | WL_EXIT_ON_PM_DEATH,
|
WL_LATCH_SET | WL_TIMEOUT | WL_EXIT_ON_PM_DEATH,
|
||||||
BgWriterDelay * HIBERNATE_FACTOR,
|
BgWriterDelay * HIBERNATE_FACTOR,
|
||||||
WAIT_EVENT_BGWRITER_HIBERNATE);
|
WAIT_EVENT_BGWRITER_HIBERNATE);
|
||||||
/* Reset the notification request in case we timed out */
|
/* Reset the notification request in case we timed out */
|
||||||
StrategyNotifyBgWriter(-1);
|
StrategyNotifyBgWriter(-1);
|
||||||
}
|
}
|
||||||
|
@ -217,7 +217,6 @@ worker_spi_main(Datum main_arg)
|
|||||||
while (!got_sigterm)
|
while (!got_sigterm)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
int rc;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Background workers mustn't call usleep() or any direct equivalent:
|
* Background workers mustn't call usleep() or any direct equivalent:
|
||||||
@ -225,10 +224,10 @@ worker_spi_main(Datum main_arg)
|
|||||||
* necessary, but is awakened if postmaster dies. That way the
|
* necessary, but is awakened if postmaster dies. That way the
|
||||||
* background process goes away immediately in an emergency.
|
* background process goes away immediately in an emergency.
|
||||||
*/
|
*/
|
||||||
rc = WaitLatch(MyLatch,
|
(void) WaitLatch(MyLatch,
|
||||||
WL_LATCH_SET | WL_TIMEOUT | WL_EXIT_ON_PM_DEATH,
|
WL_LATCH_SET | WL_TIMEOUT | WL_EXIT_ON_PM_DEATH,
|
||||||
worker_spi_naptime * 1000L,
|
worker_spi_naptime * 1000L,
|
||||||
PG_WAIT_EXTENSION);
|
PG_WAIT_EXTENSION);
|
||||||
ResetLatch(MyLatch);
|
ResetLatch(MyLatch);
|
||||||
|
|
||||||
CHECK_FOR_INTERRUPTS();
|
CHECK_FOR_INTERRUPTS();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user