Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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

+4-1
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)