diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2018-11-23 13:01:05 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2018-11-23 13:01:05 -0300 |
commit | 3be5fe2b107fae24e03c9d29d7bd7c7ad5345787 (patch) | |
tree | b6b87771e8c14a3ebfb57843e432e0de7da5a53f /src | |
parent | 0f75a466ac41a19214d22de73cceeb5dc792411a (diff) | |
download | postgresql-3be5fe2b107fae24e03c9d29d7bd7c7ad5345787.tar.gz postgresql-3be5fe2b107fae24e03c9d29d7bd7c7ad5345787.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/postmaster/bgwriter.c | 8 | ||||
-rw-r--r-- | src/test/modules/worker_spi/worker_spi.c | 9 |
2 files changed, 8 insertions, 9 deletions
diff --git a/src/backend/postmaster/bgwriter.c b/src/backend/postmaster/bgwriter.c index bd8dc61182d..7612b17b442 100644 --- a/src/backend/postmaster/bgwriter.c +++ b/src/backend/postmaster/bgwriter.c @@ -361,10 +361,10 @@ BackgroundWriterMain(void) /* Ask for notification at next buffer allocation */ StrategyNotifyBgWriter(MyProc->pgprocno); /* Sleep ... */ - rc = WaitLatch(MyLatch, - WL_LATCH_SET | WL_TIMEOUT | WL_EXIT_ON_PM_DEATH, - BgWriterDelay * HIBERNATE_FACTOR, - WAIT_EVENT_BGWRITER_HIBERNATE); + (void) WaitLatch(MyLatch, + WL_LATCH_SET | WL_TIMEOUT | WL_EXIT_ON_PM_DEATH, + BgWriterDelay * HIBERNATE_FACTOR, + WAIT_EVENT_BGWRITER_HIBERNATE); /* Reset the notification request in case we timed out */ StrategyNotifyBgWriter(-1); } diff --git a/src/test/modules/worker_spi/worker_spi.c b/src/test/modules/worker_spi/worker_spi.c index 52a3208527e..838133a2081 100644 --- a/src/test/modules/worker_spi/worker_spi.c +++ b/src/test/modules/worker_spi/worker_spi.c @@ -217,7 +217,6 @@ worker_spi_main(Datum main_arg) while (!got_sigterm) { int ret; - int rc; /* * 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 * background process goes away immediately in an emergency. */ - rc = WaitLatch(MyLatch, - WL_LATCH_SET | WL_TIMEOUT | WL_EXIT_ON_PM_DEATH, - worker_spi_naptime * 1000L, - PG_WAIT_EXTENSION); + (void) WaitLatch(MyLatch, + WL_LATCH_SET | WL_TIMEOUT | WL_EXIT_ON_PM_DEATH, + worker_spi_naptime * 1000L, + PG_WAIT_EXTENSION); ResetLatch(MyLatch); CHECK_FOR_INTERRUPTS(); |