pgsql: psql: Fix some scan-build warnings

Started by Peter Eisentrautover 4 years ago1 messagescomitters
Jump to latest
#1Peter Eisentraut
peter_e@gmx.net

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: /messages/by-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(-)