pgsql: Fix compiler warning

Started by Peter Eisentrautalmost 7 years ago7 messagescomitters
Jump to latest
#1Peter Eisentraut
peter_e@gmx.net

Fix compiler warning

Fix a warning about unused variable on Windows when using OpenSSL.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/36515e4f14fc1b22787a54d5de45b1e6b5e6cd9c

Modified Files
--------------
src/port/pg_strong_random.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

#2Michael Paquier
michael@paquier.xyz
In reply to: Peter Eisentraut (#1)
Re: pgsql: Fix compiler warning

On Sun, Sep 01, 2019 at 09:22:03PM +0000, Peter Eisentraut wrote:

Fix compiler warning

Fix a warning about unused variable on Windows when using OpenSSL.

Perhaps this could be back-patched to v12?
--
Michael

#3Peter Eisentraut
peter_e@gmx.net
In reply to: Michael Paquier (#2)
Re: pgsql: Fix compiler warning

On 2019-09-02 03:04, Michael Paquier wrote:

On Sun, Sep 01, 2019 at 09:22:03PM +0000, Peter Eisentraut wrote:

Fix compiler warning

Fix a warning about unused variable on Windows when using OpenSSL.

Perhaps this could be back-patched to v12?

Is this code new in PG12? Doesn't look like it to me.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

#4Michael Paquier
michael@paquier.xyz
In reply to: Peter Eisentraut (#3)
Re: pgsql: Fix compiler warning

On Mon, Sep 02, 2019 at 07:54:16AM +0200, Peter Eisentraut wrote:

Is this code new in PG12? Doesn't look like it to me.

Well, 12 has not been released yet, which is the point I am trying to
make. The code was introduced in 10, and as the fix is trivial it
seems to me that it could be back-patched. For example even recently
you back-patched f02bd63 in the same category. If you don't think
that's worth it, that's fine for me as well.
--
Michael

#5Peter Eisentraut
peter_e@gmx.net
In reply to: Michael Paquier (#4)
Re: pgsql: Fix compiler warning

On 2019-09-02 10:03, Michael Paquier wrote:

On Mon, Sep 02, 2019 at 07:54:16AM +0200, Peter Eisentraut wrote:

Is this code new in PG12? Doesn't look like it to me.

Well, 12 has not been released yet, which is the point I am trying to
make. The code was introduced in 10, and as the fix is trivial it
seems to me that it could be back-patched. For example even recently
you back-patched f02bd63 in the same category. If you don't think
that's worth it, that's fine for me as well.

That patch made sure the whole tree compiles without warning.

The tree currently does not compile without warnings on Windows (for
me), so it doesn't seem worth fixing warnings piece by piece in the
backbranches.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

#6Tom Lane
tgl@sss.pgh.pa.us
In reply to: Peter Eisentraut (#5)
Re: pgsql: Fix compiler warning

Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:

The tree currently does not compile without warnings on Windows (for
me), so it doesn't seem worth fixing warnings piece by piece in the
backbranches.

Hm, I see no warnings on e.g. dory. What are you seeing, and with
what toolchain? (Or should I be asking about build options?)

regards, tom lane

#7Peter Eisentraut
peter_e@gmx.net
In reply to: Tom Lane (#6)
Re: pgsql: Fix compiler warning

On 2019-09-05 16:15, Tom Lane wrote:

Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:

The tree currently does not compile without warnings on Windows (for
me), so it doesn't seem worth fixing warnings piece by piece in the
backbranches.

Hm, I see no warnings on e.g. dory. What are you seeing, and with
what toolchain? (Or should I be asking about build options?)

I'm using mingw here, so see jacana. The MSVC tool chain apparently
does not produce warnings about unused stuff, so this patch isn't of
relevance there.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services