pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: psql: Fix some scan-build warnings
Date: Tue, 12 Oct 2021 19:34:35 +0000
Message-ID: <E1maNXn-0004Ge-NP@gemulon.postgresql.org> (raw)

psql: Fix some scan-build warnings

A repeated complaint was that scan-build thought that if the \timing
setting changes during processing of a query, the post-processing
might read garbage time values.  This is probably not possible right
now, but it's not entirely inconceivable given the code structure.  So
silence this warning with small restructuring that makes this more
robust.  The other warnings were a few dead stores that are easy to
remove.

Discussion: https://www.postgresql.org/message-id/2570e2ae-fa0f-aac9-f72f-bb59a9983a20@enterprisedb.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/390edeeb570c01de1a14e2985ffed96de001e42e

Modified Files
--------------
src/bin/psql/common.c   | 32 ++++++++++++++++++--------------
src/bin/psql/copy.c     |  1 -
src/bin/psql/describe.c |  1 -
3 files changed, 18 insertions(+), 16 deletions(-)



Message-ID: <E1maNXn-0004Ge-NP@gemulon.postgresql.org>
Permalink:  ../E1maNXn-0004Ge-NP@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1maNXn-0004Ge-NP@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: peter@eisentraut.org
  Subject: Re: pgsql: psql: Fix some scan-build warnings
  In-Reply-To: <E1maNXn-0004Ge-NP@gemulon.postgresql.org>
  References: <E1maNXn-0004Ge-NP@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox