Re: pgsql: Report progress of CREATE INDEX operations

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Report progress of CREATE INDEX operations
Date: 2019-04-02 19:04:31
Message-ID: 20190402190431.GA22549@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On 2019-Apr-02, Andres Freund wrote:

> Note that longfin complains about something different than the output
> files:
>
> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=longfin&dt=2019-04-02%2018%3A49%3A03
>
> lmgr.c:882:14: error: variable 'count' is used uninitialized whenever '?:' condition is false [-Werror,-Wsometimes-uninitialized]
> progress ? &count : NULL));
> ^~~~~~~~
> lmgr.c:883:12: note: uninitialized use occurs here
> total += count;
> ^~~~~
> lmgr.c:882:14: note: remove the '?:' if its condition is always true
> progress ? &count : NULL));
> ^~~~~~~~~~~ ~~~~~~~
> lmgr.c:878:14: note: initialize the variable 'count' to silence this warning
> int count;
> ^

Had noticed, thanks. Just pushed a blind fix for that ...

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Tomas Vondra 2019-04-02 23:25:40 Re: pgsql: Add support for multivariate MCV lists
Previous Message Alvaro Herrera 2019-04-02 19:03:52 pgsql: Prevent use of uninitialized variable