Skip to content

Commit 45aae8e

Browse files
committed
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.
1 parent 9c50372 commit 45aae8e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/timezone/zic.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1179,11 +1179,14 @@ gethms(char const * string, char const * errstring, bool signable)
11791179
error("%s", errstring);
11801180
return 0;
11811181
}
1182-
if (ZIC_MAX / SECSPERHOUR < (zic_t) hh)
1182+
/* Some compilers warn that this test is unsatisfiable for 32-bit ints */
1183+
#if INT_MAX > PG_INT32_MAX
1184+
if (ZIC_MAX / SECSPERHOUR < hh)
11831185
{
11841186
error(_("time overflow"));
11851187
return 0;
11861188
}
1189+
#endif
11871190
if (noise && (hh > HOURSPERDAY ||
11881191
(hh == HOURSPERDAY && (mm != 0 || ss != 0))))
11891192
warning(_("values over 24 hours not handled by pre-2007 versions of zic"));

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy