Re: pgsql: Allow pg_basebackup to stream transaction log in tar mode

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
Cc: pgsql-committers <pgsql-committers(at)postgresql(dot)org>
Subject: Re: pgsql: Allow pg_basebackup to stream transaction log in tar mode
Date: 2016-10-24 18:11:31
Message-ID: CABUevEwkBX91Rbn8_qkT+adpe0Dge+-fFpVB1Vkajp3v9PBtgg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Mon, Oct 24, 2016 at 2:58 PM, Alexander Korotkov <
a(dot)korotkov(at)postgrespro(dot)ru> wrote:

> I have following warning while compiling with clang.
>
> walmethods.c:437:9: warning: comparison of unsigned expression < 0 is
> always false [-Wtautological-compare]
> if (r < 0)
> ~ ^ ~
> 1 warning generated.
>
> It seems that 'r' should be 'ssize_t' instead of 'size_t'.
>

Yup. The result from tar_write() is ssize_t so it definitely should be.

Thanks, I've applied a fix.

//Magnus

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Magnus Hagander 2016-10-24 18:11:34 pgsql: Use ssize_t where signed results can happen
Previous Message Andrew Dunstan 2016-10-24 15:21:56 Re: pgsql: Use OpenSSL EVP API for symmetric encryption in pgcrypto.