From 8ffc496b1144a78056c3c3b0cd36e9c94db3208d Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Sat, 11 Jul 2026 14:15:31 +0200 Subject: [PATCH 3/3] Use a different trick to silence warnings about cross-enum comparisons --- src/timezone/zic.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/timezone/zic.c b/src/timezone/zic.c index b61082dfdf1..31fe10c0280 100644 --- a/src/timezone/zic.c +++ b/src/timezone/zic.c @@ -346,19 +346,12 @@ enum /* * The maximum number of fields on any of the above lines. - * (The "+"s pacify gcc -Wenum-compare.) + * (The casts pacify gcc -Wenum-compare.) */ enum { -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable: 5287) -#endif - MAX_FIELDS = max(max(+RULE_FIELDS, +LINK_FIELDS), - max(+LEAP_FIELDS, +EXPIRES_FIELDS)) -#ifdef _MSC_VER -#pragma warning(pop) -#endif + MAX_FIELDS = max(max((int) RULE_FIELDS, (int) LINK_FIELDS), + max((int) LEAP_FIELDS, (int) EXPIRES_FIELDS)) }; /* -- 2.55.0