Re: pgsql: Fix memory leak in pgbench

From: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Fix memory leak in pgbench
Date: 2019-04-10 07:05:34
Message-ID: CAD21AoAZ4q93m2oTx2g62boyVTu7fXOJpLHqBFk8S1t6VM2zjw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Wed, Apr 10, 2019 at 3:10 PM Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> wrote:
>
>
> Hello Masahiko-san,
>
> > This change leads a compiler warning on my machine:
> >
> > pgbench.c: In function ‘readCommandResponse’:
> > pgbench.c:2730: warning: ISO C90 forbids mixed declarations and code
>
> <https://www.postgresql.org/docs/devel/source-conventions.html> says:
>
> "Code in PostgreSQL should only rely on language features available in the
> C99 standard"
>
> So it should be all right wrt to warnings.
>
> However the pg style in the same page says that intermingling decl & code
> is not permitted, so the proposed patch should be applied.

Thank you! I didn't know the detail of that PostgreSQL supports C99
standard but I hope the warning will be fixed and coming patches will
still obey that rule.

Regards,

--
Masahiko Sawada
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Noah Misch 2019-04-10 07:06:44 Re: pgsql: Avoid "could not reattach" by providing space for concurrent all
Previous Message Fabien COELHO 2019-04-10 06:11:54 Re: pgsql: Fix memory leak in pgbench