mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
Miscellaneous cleanup to silence compiler warnings seen on Mingw.
Remove some dead code, conditionally declare some items or call some code, and fix one or two declarations.
This commit is contained in:
@ -130,9 +130,8 @@ timestamp2tm(timestamp dt, int *tzp, struct tm * tm, fsec_t *fsec, char **tzn)
|
||||
date0;
|
||||
double time;
|
||||
#endif
|
||||
time_t utime;
|
||||
|
||||
#if defined(HAVE_TM_ZONE) || defined(HAVE_INT_TIMEZONE)
|
||||
time_t utime;
|
||||
struct tm *tx;
|
||||
#endif
|
||||
|
||||
@ -202,6 +201,8 @@ recalc_t:
|
||||
*/
|
||||
if (IS_VALID_UTIME(tm->tm_year, tm->tm_mon, tm->tm_mday))
|
||||
{
|
||||
#if defined(HAVE_TM_ZONE) || defined(HAVE_INT_TIMEZONE)
|
||||
|
||||
#ifdef HAVE_INT64_TIMESTAMP
|
||||
utime = dt / USECS_PER_SEC +
|
||||
((date0 - date2j(1970, 1, 1)) * INT64CONST(86400));
|
||||
@ -209,7 +210,6 @@ recalc_t:
|
||||
utime = dt + (date0 - date2j(1970, 1, 1)) * SECS_PER_DAY;
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_TM_ZONE) || defined(HAVE_INT_TIMEZONE)
|
||||
tx = localtime(&utime);
|
||||
tm->tm_year = tx->tm_year + 1900;
|
||||
tm->tm_mon = tx->tm_mon + 1;
|
||||
|
Reference in New Issue
Block a user