pgsql: Fix some compiler warnings

2025-12-04 Thread Michael Paquier
Fix some compiler warnings Some of the buildfarm members with some old gcc versions have been complaining about an always-true test for a NULL pointer caused by a combination of SOFT_ERROR_OCCURRED() and a local ErrorSaveContext variable. These warnings are taken care of by removing SOFT_ERROR_OC

pgsql: Fix some compiler warnings in aset.c and generation.c

2023-01-04 Thread David Rowley
Fix some compiler warnings in aset.c and generation.c This fixes a couple of unused variable warnings that could be seen when compiling with MEMORY_CONTEXT_CHECKING but not USE_ASSERT_CHECKING. Defining MEMORY_CONTEXT_CHECKING without asserts is a little unusual, however, we shouldn't be producing

pgsql: Fix some compiler warnings with timestamp parsing in formatting.

2019-12-10 Thread Michael Paquier
Fix some compiler warnings with timestamp parsing in formatting.c gcc-7 used with a sufficient optimization level complains about warnings around do_to_timestamp() regarding the initialization and handling of some of its variables. Recent commits 66c74f8 and d589f94 made things made the interface

pgsql: Fix some compiler warnings on older compilers

2019-11-04 Thread Peter Eisentraut
Fix some compiler warnings on older compilers Some older compilers appear to not understand the recently introduced PG_FINALLY code structure that well in some circumstances and complain about possibly uninitialized variables. So to fix, initialize the variables explicitly in the cases complained