summaryrefslogtreecommitdiff
path: root/o3tl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-04-20 11:06:52 +0200
committerStephan Bergmann <sbergman@redhat.com>2022-04-20 13:39:09 +0200
commit956a01947d869247e5e117105a1e17edd46bfce1 (patch)
tree2ac8cc894e61a5dd4583fbfa07b0ff6c96caf11b /o3tl
parent6a868fff7a947a630ef1e1573a165f8fe690fad0 (diff)
Avoid unhelpful loplugin:stringviewvar
Regression during `make check` introduced with ab699bfdb3375f7142a50cc35322e2924c9e5945 "new loplugin:stringviewvar looks for OUString vars that can be". Change-Id: Ib6b9aabcfd380b43a77a97cf9d7e15c37aeb852c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133204 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'o3tl')
-rw-r--r--o3tl/qa/test-string_view.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/o3tl/qa/test-string_view.cxx b/o3tl/qa/test-string_view.cxx
index 80f9bd9e13fd..0cc753795df2 100644
--- a/o3tl/qa/test-string_view.cxx
+++ b/o3tl/qa/test-string_view.cxx
@@ -603,7 +603,9 @@ private:
void testGetToken()
{
{
- OUString suTokenStr;
+ // Explicit initialization of suTokenStr to avoid an unhelpful loplugin:stringviewvar;
+ // it is the o3tl::getToken overload taking OUString that we want to test here:
+ OUString suTokenStr("");
sal_Int32 nIndex = 0;
do
{