Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3be5fe2

Browse files
committed
Silence compiler warnings
Commitcfdf4dc left a few unnecessary assignments, one of whichcaused compiler warnings, as reported by Erik Rijkers. Remove them all.Discussion:https://postgr.es/m/df0dcca2025b3d90d946ecc508ca9678@xs4all.nl
1 parent0f75a46 commit3be5fe2

File tree

3 files changed

+16
-19
lines changed

3 files changed

+16
-19
lines changed

‎contrib/pg_prewarm/autoprewarm.c

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,6 @@ autoprewarm_main(Datum main_arg)
207207
/* Periodically dump buffers until terminated. */
208208
while (!got_sigterm)
209209
{
210-
intrc;
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. */

‎src/backend/postmaster/bgwriter.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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
}

‎src/test/modules/worker_spi/worker_spi.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -217,18 +217,17 @@ worker_spi_main(Datum main_arg)
217217
while (!got_sigterm)
218218
{
219219
intret;
220-
intrc;
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();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp