Обсуждение: pgsql: Fix compiler warning

Поиск
Список
Период
Сортировка

pgsql: Fix compiler warning

От
Peter Eisentraut
Дата:
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

От
Michael Paquier
Дата:
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

Вложения

Re: pgsql: Fix compiler warning

От
Peter Eisentraut
Дата:
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

От
Michael Paquier
Дата:
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

Вложения

Re: pgsql: Fix compiler warning

От
Peter Eisentraut
Дата:
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

От
Tom Lane
Дата:
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

От
Peter Eisentraut
Дата:
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