pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Erik Rijkers <er@xs4all.nl>
To: pgsql-hackers@postgresql.org
Subject: prewarm compiler warnings
Date: Fri, 23 Nov 2018 16:34:29 +0100
Message-ID: <df0dcca2025b3d90d946ecc508ca9678@xs4all.nl> (raw)

gcc-6.3.0 complains about this:

autoprewarm.c: In function ‘autoprewarm_main’:
autoprewarm.c:210:9: warning: variable ‘rc’ set but not used 
[-Wunused-but-set-variable]
    int   rc;

The warning comes only in master.

The warnings are a bit annoying; the attached silences them by removing 
those assignments.

Thanks,

Erik Rijkers

Attachments:

prewarm-fix.diff (text/x-diff, 896B) download --- ./contrib/pg_prewarm/autoprewarm.c.orig 2018-11-23 13:34:08.237110218 +0100 +++ ./contrib/pg_prewarm/autoprewarm.c 2018-11-23 13:34:38.333492968 +0100 @@ -207,8 +207,6 @@ /* Periodically dump buffers until terminated. */ while (!got_sigterm) { - int rc; - /* In case of a SIGHUP, just reload the configuration. */ if (got_sighup) { @@ -219,7 +217,7 @@ if (autoprewarm_interval <= 0) { /* We're only dumping at shutdown, so just wait forever. */ - rc = WaitLatch(&MyProc->procLatch, + WaitLatch(&MyProc->procLatch, WL_LATCH_SET | WL_EXIT_ON_PM_DEATH, -1L, PG_WAIT_EXTENSION); @@ -248,7 +246,7 @@ } /* Sleep until the next dump time. */ - rc = WaitLatch(&MyProc->procLatch, + WaitLatch(&MyProc->procLatch, WL_LATCH_SET | WL_TIMEOUT | WL_EXIT_ON_PM_DEATH, delay_in_ms, PG_WAIT_EXTENSION);

view thread (2+ messages)  latest in thread

Message-ID: <df0dcca2025b3d90d946ecc508ca9678@xs4all.nl>
Permalink:  ../df0dcca2025b3d90d946ecc508ca9678@xs4all.nl/
Also on:    postgresql.org/message-id/df0dcca2025b3d90d946ecc508ca9678@xs4all.nl

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: er@xs4all.nl
  Subject: Re: prewarm compiler warnings
  In-Reply-To: <df0dcca2025b3d90d946ecc508ca9678@xs4all.nl>
  References: <df0dcca2025b3d90d946ecc508ca9678@xs4all.nl>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox