o3tl/qa/test-string_view.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit 956a01947d869247e5e117105a1e17edd46bfce1 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Wed Apr 20 11:06:52 2022 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Wed Apr 20 13:39:09 2022 +0200 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 <sberg...@redhat.com> 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 {