pgsql: Fix assorted compiler warnings seen in the buildfarm.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix assorted compiler warnings seen in the buildfarm.
Date: 2018-05-02 19:53:14
Message-ID: E1fDxoQ-000356-6r@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix assorted compiler warnings seen in the buildfarm.

Failure to use DatumGetFoo/FooGetDatum macros correctly, or at all,
causes some warnings about sign conversion. This is just cosmetic
at the moment but in principle it's a type violation, so clean up
the instances I could find.

autoprewarm.c and sharedfileset.c contained code that unportably
assumed that pid_t is the same size as int. We've variously dealt
with this by casting pid_t to int or to unsigned long for printing
purposes; I went with the latter.

Fix uninitialized-variable warning in RestoreGUCState. This is
a live bug in some sense, but of no great significance given that
nobody is very likely to care what "line number" is associated with
a GUC that hasn't got a source file recorded.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/fbb2e9a030ee7a3fa20ce402e4b1da9809b4eb52

Modified Files
--------------
contrib/hstore/hstore_io.c | 10 +++++++---
contrib/jsonb_plpython/jsonb_plpython.c | 9 +++++++--
contrib/pg_prewarm/autoprewarm.c | 20 ++++++++++----------
src/backend/storage/file/sharedfileset.c | 4 ++--
src/backend/utils/adt/jsonb.c | 19 +++++++++++++------
src/backend/utils/adt/numeric.c | 24 ++++++++++++------------
src/backend/utils/adt/pgstatfuncs.c | 2 +-
src/backend/utils/misc/guc.c | 2 ++
8 files changed, 54 insertions(+), 36 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2018-05-02 20:00:59 pgsql: Suppress some compiler warnings in plperl on Windows.
Previous Message Tom Lane 2018-05-02 16:23:19 pgsql: Fix bogus code for extracting extended-statistics data from sysc