@@ -70,7 +70,7 @@ namespace
7070 }
7171 }
7272
73- bool contains (const char * value, USHORT& outTimezoneId, FB_SIZE_T & outParsedTimezoneLength)
73+ bool contains (const char * value, USHORT& outTimezoneId, unsigned int & outParsedTimezoneLength)
7474 {
7575 const TrieNode* currentNode = m_root;
7676 FB_SIZE_T valueLength = fb_strlen (value);
@@ -97,7 +97,7 @@ namespace
9797 TrieNode* currentNode = m_root;
9898 FB_SIZE_T valueLength = fb_strlen (value);
9999
100- for (FB_SIZE_T i = 0 ; i < valueLength; i++)
100+ for (unsigned int i = 0 ; i < valueLength; i++)
101101 {
102102 int index = calculateIndex (value[i]);
103103
@@ -460,7 +460,7 @@ namespace
460460 patternStr = std::string_view (format + formatStart, offset - formatStart + 1 );
461461 bool isFound = false ;
462462
463- for (int j = 0 ; j < PatternsSize; j++)
463+ for (unsigned int j = 0 ; j < PatternsSize; j++)
464464 {
465465 if (!strncmp (patterns[j], patternStr.data (), patternStr.length ()))
466466 {
@@ -1124,6 +1124,7 @@ namespace
11241124 return twelveHours == 12 ? twelveHours : 12 + twelveHours;
11251125
11261126 cb->err (Arg::Gds (isc_incorrect_hours_period) << string (period.data (), period.length ()));
1127+ return 0 ; // suppress compiler warning/error
11271128 }
11281129
11291130 constexpr int roundYearPatternImplementation (int parsedRRValue, int currentYear)
@@ -1331,7 +1332,7 @@ namespace
13311332 bool isFound = false ;
13321333
13331334 std::string_view monthShortName = getSubstringFromString (str, strLength, strOffset, 3 );
1334- for (int i = 0 ; i < FB_NELEM (FB_SHORT_MONTHS) - 1 ; i++)
1335+ for (FB_SIZE_T i = 0 ; i < FB_NELEM (FB_SHORT_MONTHS) - 1 ; i++)
13351336 {
13361337 if (std::equal (monthShortName.begin (), monthShortName.end (),
13371338 FB_SHORT_MONTHS[i], FB_SHORT_MONTHS[i] + strlen (FB_SHORT_MONTHS[i]),
@@ -1352,7 +1353,7 @@ namespace
13521353 bool isFound = false ;
13531354
13541355 std::string_view monthFullName = getSubstringFromString (str, strLength, strOffset);
1355- for (int i = 0 ; i < FB_NELEM (FB_LONG_MONTHS_UPPER) - 1 ; i++)
1356+ for (FB_SIZE_T i = 0 ; i < FB_NELEM (FB_LONG_MONTHS_UPPER) - 1 ; i++)
13561357 {
13571358 if (std::equal (monthFullName.begin (), monthFullName.end (),
13581359 FB_LONG_MONTHS_UPPER[i], FB_LONG_MONTHS_UPPER[i] + strlen (FB_LONG_MONTHS_UPPER[i]),
@@ -1541,7 +1542,7 @@ namespace
15411542 }
15421543 case Format::TZR:
15431544 {
1544- FB_SIZE_T parsedTimezoneNameLength = 0 ;
1545+ unsigned int parsedTimezoneNameLength = 0 ;
15451546 const bool timezoneNameIsCorrect = timeZoneTrie ().contains (str + strOffset, outTimezoneId, parsedTimezoneNameLength);
15461547 if (!timezoneNameIsCorrect)
15471548 status_exception::raise (Arg::Gds (isc_invalid_timezone_region) << string (str + strOffset, parsedTimezoneNameLength));
@@ -1668,7 +1669,7 @@ ISC_TIMESTAMP_TZ CVT_format_string_to_datetime(const dsc* desc, const Firebird::
16681669 stringUpper[i] = toupper (sourceString[i]);
16691670
16701671 string formatUpper (format.length (), ' \0 ' );
1671- for (auto i = 0 ; i < format.length (); i++)
1672+ for (unsigned int i = 0 ; i < format.length (); i++)
16721673 formatUpper[i] = toupper (format[i]);
16731674
16741675 StringToDateTimeData cvtData;
0 commit comments