Thread: pgsql: Fix compiler warning

pgsql: Fix compiler warning

From
Peter Eisentraut
Date:
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(-)


Re: pgsql: Fix compiler warning

From
Michael Paquier
Date:
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

Attachment

Re: pgsql: Fix compiler warning

From
Peter Eisentraut
Date:
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



Re: pgsql: Fix compiler warning

From
Michael Paquier
Date:
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

Attachment

Re: pgsql: Fix compiler warning

From
Peter Eisentraut
Date:
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



Re: pgsql: Fix compiler warning

From
Tom Lane
Date:
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



Re: pgsql: Fix compiler warning

From
Peter Eisentraut
Date:
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