diff --git a/intl/unicharutil/tests/NormalizationTest.cpp b/intl/unicharutil/tests/NormalizationTest.cpp index 1b955a2ee43..8f6980932f9 100644 --- a/intl/unicharutil/tests/NormalizationTest.cpp +++ b/intl/unicharutil/tests/NormalizationTest.cpp @@ -10,6 +10,7 @@ #include "nsString.h" #include "nsCharTraits.h" #include "nsServiceManagerUtils.h" +#include "mozilla/Snprintf.h" struct testcaseLine { wchar_t* c1; @@ -136,7 +137,6 @@ bool TestUnspecifiedCodepoint(uint32_t codepoint) bool rv = true; char16_t unicharArray[3]; nsAutoString X, normalized; - char description[9]; if (IS_IN_BMP(codepoint)) { unicharArray[0] = codepoint; @@ -157,8 +157,11 @@ bool TestUnspecifiedCodepoint(uint32_t codepoint) X == NFC(X) == NFD(X) == NFKC(X) == NFKD(X) */ + static const size_t len = 9; + char description[len]; + DEBUG_TESTCASE(X); - sprintf(description, "U+%04X", codepoint); + snprintf(description, len, "U+%04X", codepoint); NORMALIZE_AND_COMPARE(X, X, NFC, description); NORMALIZE_AND_COMPARE(X, X, NFD, description); NORMALIZE_AND_COMPARE(X, X, NFKC, description); diff --git a/intl/unicharutil/tests/moz.build b/intl/unicharutil/tests/moz.build index fce190db882..b9282c2fae9 100755 --- a/intl/unicharutil/tests/moz.build +++ b/intl/unicharutil/tests/moz.build @@ -8,7 +8,4 @@ SOURCES += [ 'NormalizationTest.cpp', ] -# XXX: We should fix these warnings. -ALLOW_COMPILER_WARNINGS = True - FINAL_LIBRARY = 'xul-gtest' diff --git a/intl/unicharutil/util/moz.build b/intl/unicharutil/util/moz.build index 4aaa6eb33f4..ce2f3f0f5d7 100644 --- a/intl/unicharutil/util/moz.build +++ b/intl/unicharutil/util/moz.build @@ -43,7 +43,4 @@ if CONFIG['ENABLE_INTL_API']: CXXFLAGS += CONFIG['MOZ_ICU_CFLAGS'] USE_LIBS += ['icu'] -if not CONFIG['GNU_CXX']: - ALLOW_COMPILER_WARNINGS = True - DIST_INSTALL = True