Compiler warning

Started by Bruce Momjianabout 9 years ago2 messages
#1Bruce Momjian
bruce@momjian.us

I am seeing this compiler warning in the 9.4 branch:

9.4: basebackup.c:1284:6: warning: variable 'wait_result' set but not used [-Wunused-but-set-variable]

This is on Debian Jessie with gcc version 4.9.2. It is from this commit:

commit f6508827afe76b2c3735a9ce073620e708d60c79
Author: Magnus Hagander <magnus@hagander.net>
Date: Mon Dec 19 10:11:04 2016 +0100

Fix base backup rate limiting in presence of slow i/o

When source i/o on disk was too slow compared to the rate limiting
specified, the system could end up with a negative value for sleep that
it never got out of, which caused rate limiting to effectively be
turned off.

Discussion: /messages/by-id/CABUevEy_-e0YvL4ayoX8bH_Ja9w+BHoP6jUgdxZuG2nEj3uAfQ@mail.gmail.com

Analysis by me, patch by Antonin Houska

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#2Magnus Hagander
magnus@hagander.net
In reply to: Bruce Momjian (#1)
Re: Compiler warning

On Dec 24, 2016 01:21, "Bruce Momjian" <bruce@momjian.us> wrote:

I am seeing this compiler warning in the 9.4 branch:

9.4: basebackup.c:1284:6: warning: variable 'wait_result' set but not
used [-Wunused-but-set-variable]

This is on Debian Jessie with gcc version 4.9.2. It is from this commit:

commit f6508827afe76b2c3735a9ce073620e708d60c79

Hi!

This was already reported by Dean back on the thread on - committers,
including one question still to be investigated. I plan to get back to it
when I get back from Christmas holidays.

/Magnus