Fix some compiler warnings with timestamp parsing in formatting.c
authorMichael Paquier <michael@paquier.xyz>
Wed, 11 Dec 2019 01:01:06 +0000 (10:01 +0900)
committerMichael Paquier <michael@paquier.xyz>
Wed, 11 Dec 2019 01:01:06 +0000 (10:01 +0900)
commitc341c7d391e256f80cfbae53b4f55278bffca699
treed876bb8e5ad278591064350ca6acee2a98bf828c
parent8729fa72483f8a9acf299508bb2cbae1aa9a29b8
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 more confusing, so document which variables are
always expected and initialize properly the optional ones when they are
set.

Author: Andrey Lepikhov, Michael Paquier
Discussion: https://postgr.es/m/a7e28b83-27b1-4e1c-c76b-4268c4b785bc@postgrespro.ru
src/backend/utils/adt/formatting.c