X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/249c4c5ea9376c24572daf9c2effa7484a282f14..3d1f044b704633e2e541231cd17ae9ecf9ad5c7a:/icuSources/test/intltest/intltest.cpp?ds=sidebyside diff --git a/icuSources/test/intltest/intltest.cpp b/icuSources/test/intltest/intltest.cpp index e85ba87f..c1b6e5b2 100644 --- a/icuSources/test/intltest/intltest.cpp +++ b/icuSources/test/intltest/intltest.cpp @@ -1109,7 +1109,6 @@ UBool IntlTest::printKnownIssues() } } -static UMutex messageMutex = U_MUTEX_INITIALIZER; void IntlTest::LL_message( UnicodeString message, UBool newline ) { @@ -1117,7 +1116,8 @@ void IntlTest::LL_message( UnicodeString message, UBool newline ) // All error messages generated by tests funnel through here. // Multithreaded tests can concurrently generate errors, requiring synchronization // to keep each message together. - Mutex lock(&messageMutex); + static UMutex *messageMutex = STATIC_NEW(UMutex); + Mutex lock(messageMutex); // string that starts with a LineFeed character and continues // with spaces according to the current indentation @@ -2188,7 +2188,7 @@ void IntlTest::setProperty(const char* propline) { const char* IntlTest::getProperty(const char* prop) { const char* val = NULL; for (int32_t i = 0; i < numProps; i++) { - int32_t plen = uprv_strlen(prop); + int32_t plen = static_cast(uprv_strlen(prop)); if ((int32_t)uprv_strlen(proplines[i]) > plen + 1 && proplines[i][plen] == '=' && uprv_strncmp(proplines[i], prop, plen) == 0) {