ucb/source/ucp/webdav-curl/CurlSession.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
New commits: commit 4993539cacdee41b7b10fc0dc14d92b7aee9ae5b Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Mon Jul 29 08:31:07 2024 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Mon Jul 29 14:50:05 2024 +0200 cid#1615230 silence Overflowed constant bogus but lets see if this makes any difference Change-Id: I7b9a91826eb9fd65e39c0c337e05019c374773a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171176 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx b/ucb/source/ucp/webdav-curl/CurlSession.cxx index bd7b3b64c71c..9976bda67c01 100644 --- a/ucb/source/ucp/webdav-curl/CurlSession.cxx +++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx @@ -526,7 +526,7 @@ static auto ProcessHeaders(::std::vector<OString> const& rHeaders) -> ::std::map { continue; } - auto const nColon(line.find(':')); + const std::string_view::size_type nColon(line.find(':')); if (nColon == std::string_view::npos) { { @@ -542,13 +542,12 @@ static auto ProcessHeaders(::std::vector<OString> const& rHeaders) -> ::std::map // case insensitive; must be ASCII auto const name(::rtl::OStringToOUString(OString(line.substr(0, nColon)).toAsciiLowerCase(), RTL_TEXTENCODING_ASCII_US)); - sal_Int32 nStart(nColon + 1); - while (nStart < static_cast<sal_Int32>(line.size()) - && (line[nStart] == ' ' || line[nStart] == ' ')) + std::string_view::size_type nStart(nColon + 1); + while (nStart < line.size() && (line[nStart] == ' ' || line[nStart] == ' ')) { ++nStart; } - sal_Int32 nEnd(line.size()); + std::string_view::size_type nEnd(line.size()); while (nStart < nEnd && (line[nEnd - 1] == ' ' || line[nEnd - 1] == ' ')) { --nEnd;