Fix assorted compiler warnings seen in the buildfarm.
Tom Lane <tgl@sss.pgh.pa.us>
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.
Files
| Path | Change | +/− |
|---|---|---|
| contrib/hstore/hstore_io.c | modified | +7 −3 |
| contrib/jsonb_plpython/jsonb_plpython.c | modified | +7 −2 |
| contrib/pg_prewarm/autoprewarm.c | modified | +10 −10 |
| src/backend/storage/file/sharedfileset.c | modified | +2 −2 |
| src/backend/utils/adt/jsonb.c | modified | +13 −6 |
| src/backend/utils/adt/numeric.c | modified | +12 −12 |
| src/backend/utils/adt/pgstatfuncs.c | modified | +1 −1 |
| src/backend/utils/misc/guc.c | modified | +2 −0 |