From bd34f534dd41ec35f41ba4ece48120e6769ef468 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Fri, 9 Feb 2024 13:02:01 -0500 Subject: [PATCH] libroot: Disable -Werror and re-enable safeClone usage. This code depends on the inline buffer being used at the moment. Eventually we should refactor it, but for now, just use the deprecated method. Should fix regressions following ICU upgrade. --- src/system/libroot/add-ons/icu/ICUCtypeData.cpp | 8 +------- src/system/libroot/add-ons/icu/Jamfile | 3 +++ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/system/libroot/add-ons/icu/ICUCtypeData.cpp b/src/system/libroot/add-ons/icu/ICUCtypeData.cpp index e808c83d96..8b985428cf 100644 --- a/src/system/libroot/add-ons/icu/ICUCtypeData.cpp +++ b/src/system/libroot/add-ons/icu/ICUCtypeData.cpp @@ -543,17 +543,11 @@ ICUCtypeData::_GetConverterForMbState(mbstate_t* mbState, if (result != B_OK) return result; - UErrorCode icuStatus = U_ZERO_ERROR; -#if U_ICU_VERSION_MAJOR_NUM < 71 // ... and clone it into the mbstate + UErrorCode icuStatus = U_ZERO_ERROR; int32_t bufferSize = sizeof(mbState->data); UConverter* clone = ucnv_safeClone(icuConverter, mbState->data, &bufferSize, &icuStatus); -#else - // ... and clone it into the mbstate - UConverter* clone - = ucnv_clone(icuConverter, &icuStatus); -#endif if (clone == NULL || !U_SUCCESS(icuStatus)) return B_ERROR; diff --git a/src/system/libroot/add-ons/icu/Jamfile b/src/system/libroot/add-ons/icu/Jamfile index 3c076f30f3..6b28532d98 100644 --- a/src/system/libroot/add-ons/icu/Jamfile +++ b/src/system/libroot/add-ons/icu/Jamfile @@ -8,6 +8,9 @@ UsePrivateHeaders shared ; +# needed for -Werror=deprecated-declarations +SubDirC++Flags -Wno-error ; + local architectureObject ; for architectureObject in [ MultiArchSubDirSetup ] { on $(architectureObject) {