ICU-20680 revert use of UPRV_UNREACHABLE in places actually reached in production code
diff --git a/icu4c/source/common/uinvchar.cpp b/icu4c/source/common/uinvchar.cpp
index 6e5fb48..05bcf10 100644
--- a/icu4c/source/common/uinvchar.cpp
+++ b/icu4c/source/common/uinvchar.cpp
@@ -207,7 +207,8 @@
while(length>0) {
u=*us++;
if(!UCHAR_IS_INVARIANT(u)) {
- UPRV_UNREACHABLE; /* Variant characters were used. These are not portable in ICU. */
+ U_ASSERT(FALSE); /* Variant characters were used. These are not portable in ICU. */
+ u=0;
}
*cs++=(char)UCHAR_TO_CHAR(u);
--length;
diff --git a/icu4c/source/i18n/usearch.cpp b/icu4c/source/i18n/usearch.cpp
index 1fc6e13..1baec3d 100644
--- a/icu4c/source/i18n/usearch.cpp
+++ b/icu4c/source/i18n/usearch.cpp
@@ -3544,7 +3544,8 @@
// Verify that it is the next one in sequence, which is all
// that is allowed.
if (index != limitIx) {
- UPRV_UNREACHABLE;
+ U_ASSERT(FALSE);
+ return NULL;
}
// Manage the circular CE buffer indexing
@@ -3581,7 +3582,8 @@
// Verify that it is the next one in sequence, which is all
// that is allowed.
if (index != limitIx) {
- UPRV_UNREACHABLE;
+ U_ASSERT(FALSE);
+ return NULL;
}
// Manage the circular CE buffer indexing