Commit 45aae8e7 authored by Tom Lane's avatar Tom Lane

Suppress compiler warning.

Some buildfarm members are showing "comparison is always false due to
limited range of data type" complaints on this test, so #ifdef it out
on machines with 32-bit int.
parent 9c50372d
...@@ -1179,11 +1179,14 @@ gethms(char const * string, char const * errstring, bool signable) ...@@ -1179,11 +1179,14 @@ gethms(char const * string, char const * errstring, bool signable)
error("%s", errstring); error("%s", errstring);
return 0; return 0;
} }
if (ZIC_MAX / SECSPERHOUR < (zic_t) hh) /* Some compilers warn that this test is unsatisfiable for 32-bit ints */
#if INT_MAX > PG_INT32_MAX
if (ZIC_MAX / SECSPERHOUR < hh)
{ {
error(_("time overflow")); error(_("time overflow"));
return 0; return 0;
} }
#endif
if (noise && (hh > HOURSPERDAY || if (noise && (hh > HOURSPERDAY ||
(hh == HOURSPERDAY && (mm != 0 || ss != 0)))) (hh == HOURSPERDAY && (mm != 0 || ss != 0))))
warning(_("values over 24 hours not handled by pre-2007 versions of zic")); warning(_("values over 24 hours not handled by pre-2007 versions of zic"));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment