diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-12-23 13:16:31 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-12-26 14:51:15 +0100 |
commit | a3d0091d185f39eddabf4d372ebe0ac3061dbb89 (patch) | |
tree | 4d70cedc274972ccc21b6b8e7105f042090cf5d6 /sal/qa/rtl | |
parent | af791fb775e35c11ad01c42a7085dd121ab9c7a6 (diff) |
New loplugin:stringliteralvar
See the comment at the top of compilerplugins/clang/stringliteralvar.cxx for
details.
(Turned some affected variables in included files into inline variables, to
avoid GCC warnings about unused variables.)
Change-Id: Ie77219e6adfdaaceaa8b4e590b08971f2f04c83a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108239
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sal/qa/rtl')
-rw-r--r-- | sal/qa/rtl/uri/rtl_testuri.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sal/qa/rtl/uri/rtl_testuri.cxx b/sal/qa/rtl/uri/rtl_testuri.cxx index e2d076b19127..3cc366a9336d 100644 --- a/sal/qa/rtl/uri/rtl_testuri.cxx +++ b/sal/qa/rtl/uri/rtl_testuri.cxx @@ -358,7 +358,7 @@ void Test::test_Uri() { // Check encode with unusual text encodings: { - sal_Unicode const aText1U[] = u" !\u0401\u045F"; + static OUStringLiteral const aText1U = u" !\u0401\u045F"; aText1 = OUString(aText1U); aText2 = "%20!%A1%FF"; CPPUNIT_ASSERT_EQUAL_MESSAGE( @@ -374,9 +374,9 @@ void Test::test_Uri() { aText2, rtl_UriDecodeWithCharset, RTL_TEXTENCODING_ISO_8859_5)); } { - sal_Unicode const aText1U[] = u" !\u0401\u0700\u045F"; + static OUStringLiteral const aText1U = u" !\u0401\u0700\u045F"; aText1 = OUString(aText1U); - sal_Unicode const aText2U[] = + static OUStringLiteral const aText2U = u"%20!%A1\u0700%FF"; aText2 = OUString(aText2U); CPPUNIT_ASSERT_EQUAL_MESSAGE( @@ -393,7 +393,7 @@ void Test::test_Uri() { } #if WITH_LOCALE_ALL || WITH_LOCALE_zh { - sal_Unicode const aText1U[] = u" !\u028A\U00022513"; + static OUStringLiteral const aText1U = u" !\u028A\U00022513"; aText1 = OUString(aText1U); aText2 = "%20!%81%30%B1%33%95%39%C5%37"; CPPUNIT_ASSERT_EQUAL_MESSAGE( @@ -412,7 +412,7 @@ void Test::test_Uri() { // Check strict mode: { - sal_Unicode const aText1U[] = u" !\u0401\u0700\u045F"; + static OUStringLiteral const aText1U = u" !\u0401\u0700\u045F"; aText1 = OUString(aText1U); aText2 = OUString(); CPPUNIT_ASSERT_EQUAL_MESSAGE( @@ -452,7 +452,7 @@ void Test::test_Uri() { } { aText1 = "%81%30%B1%33"; - sal_Unicode const aText2U[] = u"\u028A"; + static OUStringLiteral const aText2U = u"\u028A"; aText2 = OUString(aText2U); CPPUNIT_ASSERT_EQUAL_MESSAGE( "failure 27", @@ -462,7 +462,7 @@ void Test::test_Uri() { } { aText1 = "%810%B13"; - sal_Unicode const aText2U[] = u"\u028A"; + static OUStringLiteral const aText2U = u"\u028A"; aText2 = OUString(aText2U); CPPUNIT_ASSERT_EQUAL_MESSAGE( "failure 28", @@ -484,7 +484,7 @@ void Test::test_Uri() { RTL_TEXTENCODING_UTF8)); } { - sal_Unicode const aText1U[] = u"\u00EA"; + static OUStringLiteral const aText1U = u"\u00EA"; aText1 = OUString(aText1U); aText2 = "%C3%AA"; CPPUNIT_ASSERT_EQUAL_MESSAGE( @@ -495,7 +495,7 @@ void Test::test_Uri() { RTL_TEXTENCODING_UTF8)); } { - sal_Unicode const aText1U[] = u" !\u0401\u0700\u045F"; + static OUStringLiteral const aText1U = u" !\u0401\u0700\u045F"; aText1 = OUString(aText1U); aText2 = OUString(); CPPUNIT_ASSERT_EQUAL_MESSAGE( |