diff --git a/src/corelib/text/qunicodetools.cpp b/src/corelib/text/qunicodetools.cpp index 0d9935b142..a2a080d4ae 100644 --- a/src/corelib/text/qunicodetools.cpp +++ b/src/corelib/text/qunicodetools.cpp @@ -1444,7 +1444,7 @@ static void thaiAssignAttributes(const char16_t *string, qsizetype len, QCharAtt char *cstr = s; int *break_positions = nullptr; int brp[128]; - int brp_size = 0; + size_t brp_size = 0; qsizetype numbreaks, i; struct thcell_t tis_cell; @@ -1466,7 +1466,7 @@ static void thaiAssignAttributes(const char16_t *string, qsizetype len, QCharAtt if (len > 128) { break_positions = static_cast(malloc (sizeof(int) * len)); memset (break_positions, 0, sizeof(int) * len); - brp_size = len; + brp_size = size_t(len); } else { break_positions = brp;