diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2020-01-26 10:08:31 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2020-01-26 12:54:55 +0100 |
commit | a2f768f417f133fb2564ed5fe351662742dde274 (patch) | |
tree | aa023d10a85164130f9cbded6ace1c2209cf8f17 | |
parent | d87ba243e5dd2f6afcd9da7d99781a78fced1cba (diff) |
cppcheck: shadowFunction in sal/file_url
Change-Id: I7454640278f4af0f71f429b45c9f1e40f7be0545
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87433
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
-rw-r--r-- | sal/osl/unx/file_url.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sal/osl/unx/file_url.cxx b/sal/osl/unx/file_url.cxx index 207bb907feaf..513b8661d406 100644 --- a/sal/osl/unx/file_url.cxx +++ b/sal/osl/unx/file_url.cxx @@ -138,10 +138,10 @@ namespace { bool convert(OUStringBuffer const & in, OStringBuffer * append) { assert(append != nullptr); - for (sal_Size convert = in.getLength();;) { + for (sal_Size nConvert = in.getLength();;) { auto const oldLen = append->getLength(); auto n = std::min( - std::max(convert, sal_Size(PATH_MAX)), + std::max(nConvert, sal_Size(PATH_MAX)), sal_Size(std::numeric_limits<sal_Int32>::max() - oldLen)); // approximation of required converted size auto s = append->appendUninitialized(n); @@ -149,7 +149,7 @@ bool convert(OUStringBuffer const & in, OStringBuffer * append) { sal_Size converted; //TODO: context, for reliable treatment of DESTBUFFERTOSMALL: n = UnicodeToTextConverter_Impl::getInstance().convert( - in.getStr() + in.getLength() - convert, convert, s, n, + in.getStr() + in.getLength() - nConvert, nConvert, s, n, (RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR | RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR | RTL_UNICODETOTEXT_FLAGS_FLUSH), &info, &converted); @@ -157,9 +157,9 @@ bool convert(OUStringBuffer const & in, OStringBuffer * append) { return false; } append->setLength(oldLen + n); - assert(converted <= convert); - convert -= converted; - assert((convert == 0) == ((info & RTL_UNICODETOTEXT_INFO_DESTBUFFERTOSMALL) == 0)); + assert(converted <= nConvert); + nConvert -= converted; + assert((nConvert == 0) == ((info & RTL_UNICODETOTEXT_INFO_DESTBUFFERTOSMALL) == 0)); if ((info & RTL_UNICODETOTEXT_INFO_DESTBUFFERTOSMALL) == 0) { break; } |