const ListFormatData* ListFormatter::getListFormatData(
const Locale& locale, UErrorCode& errorCode) {
+ if (U_FAILURE(errorCode)) {
+ return NULL;
+ }
{
Mutex m(&listFormatterMutex);
if (listPatternHash == NULL) {
* originalString.
*/
void ListFormatter::addNewString(const UnicodeString& pat, UnicodeString& originalString,
- const UnicodeString& nextString, UErrorCode& errorCode) const {
+ const UnicodeString& nextString, UErrorCode& errorCode) const {
if (U_FAILURE(errorCode)) {
return;
}
for(int j = 1; j < 4; ++j) {
Locale in(testData[i][j-1]);
Locale out;
- UErrorCode errorCode;
+ UErrorCode errorCode = U_ZERO_ERROR;
ListFormatter::getFallbackLocale(in, out, errorCode);
if (U_FAILURE(errorCode)) {
errln("Error in getLocaleFallback: %s", u_errorName(errorCode));