mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 06:53:45 +00:00
ICU-10622 Fix warnings and errors when DEBUG is accidentally defined.
X-SVN-Rev: 35007
This commit is contained in:
parent
855434f737
commit
4397b041e3
2 changed files with 7 additions and 6 deletions
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 1997-2013, International Business Machines Corporation
|
||||
* Copyright (C) 1997-2014, International Business Machines Corporation
|
||||
* and others. All Rights Reserved.
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
@ -326,8 +326,10 @@ private:
|
|||
|
||||
#ifdef DEBUG
|
||||
#define ERROR(msg) parseError(msg); return NULL;
|
||||
#define EXPLANATION_ARG explanationArg
|
||||
#else
|
||||
#define ERROR(msg) parseError(NULL); return NULL;
|
||||
#define EXPLANATION_ARG
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -525,8 +527,8 @@ LocDataParser::nextString() {
|
|||
return result;
|
||||
}
|
||||
|
||||
void
|
||||
LocDataParser::parseError(const char* /*str*/) {
|
||||
void LocDataParser::parseError(const char* EXPLANATION_ARG)
|
||||
{
|
||||
if (!data) {
|
||||
return;
|
||||
}
|
||||
|
@ -552,13 +554,13 @@ LocDataParser::parseError(const char* /*str*/) {
|
|||
pe.offset = (int32_t)(p - data);
|
||||
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "%s at or near character %d: ", str, p-data);
|
||||
fprintf(stderr, "%s at or near character %ld: ", EXPLANATION_ARG, p-data);
|
||||
|
||||
UnicodeString msg;
|
||||
msg.append(start, p - start);
|
||||
msg.append((UChar)0x002f); /* SOLIDUS/SLASH */
|
||||
msg.append(p, limit-p);
|
||||
msg.append("'");
|
||||
msg.append(UNICODE_STRING_SIMPLE("'"));
|
||||
|
||||
char buf[128];
|
||||
int32_t len = msg.extract(0, msg.length(), buf, 128);
|
||||
|
|
|
@ -455,7 +455,6 @@ SimpleDateFormat::SimpleDateFormat(const SimpleDateFormat& other)
|
|||
fNumberFormatters(NULL),
|
||||
fOverrideList(NULL)
|
||||
{
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
initializeBooleanAttributes();
|
||||
*this = other;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue