Re: pgsql: pgbench: Allow changing weights for scripts - Mailing list pgsql-committers

From Alvaro Herrera
Subject Re: pgsql: pgbench: Allow changing weights for scripts
Date
Msg-id 20160319191932.GA304238@alvherre.pgsql
Whole thread Raw
In response to Re: pgsql: pgbench: Allow changing weights for scripts  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-committers
Tom Lane wrote:
> Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> > pgbench: Allow changing weights for scripts
>
> I'm seeing a bunch of warnings seemingly due to this commit:
>
> pgbench.c: In function 'process_builtin':
> pgbench.c:2765: warning: 'ps.stats.lag.sum2' is used uninitialized in this function
> pgbench.c:2765: warning: 'ps.stats.lag.sum' is used uninitialized in this function
> pgbench.c:2765: warning: 'ps.stats.lag.max' is used uninitialized in this function
> pgbench.c:2765: warning: 'ps.stats.lag.min' is used uninitialized in this function
> pgbench.c:2765: warning: 'ps.stats.lag.count' is used uninitialized in this function
> pgbench.c:2765: warning: 'ps.stats.latency.sum2' is used uninitialized in this function
> pgbench.c:2765: warning: 'ps.stats.latency.sum' is used uninitialized in this function
> pgbench.c:2765: warning: 'ps.stats.latency.max' is used uninitialized in this function
> pgbench.c:2765: warning: 'ps.stats.latency.min' is used uninitialized in this function
> pgbench.c:2765: warning: 'ps.stats.latency.count' is used uninitialized in this function
> pgbench.c:2765: warning: 'ps.stats.skipped' is used uninitialized in this function
> pgbench.c:2765: warning: 'ps.stats.cnt' is used uninitialized in this function
> pgbench.c:2765: warning: 'ps.stats.start_time' is used uninitialized in this function
> pgbench.c:2765: warning: 'ps.weight' is used uninitialized in this function
>
> Usually, when gcc says that, it's not a false positive.

I don't get any warnings here, but Jeff Janes had already reported
these.  I just pushed a fix.

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


pgsql-committers by date:

Previous
From: Alvaro Herrera
Date:
Subject: pgsql: pgbench: Silence new compiler warnings
Next
From: Fabien COELHO
Date:
Subject: Re: pgsql: pgbench: Allow changing weights for scripts