ucb/source/ucp/webdav-curl/CurlSession.cxx | 45 +++-------------------------- 1 file changed, 6 insertions(+), 39 deletions(-)
New commits: commit 20168b1f09b4d2aa8643dc7d4a16d8a1dd1008a6 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Tue Nov 9 12:10:25 2021 +0100 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Tue Nov 9 14:37:59 2021 +0100 The CurlOption curl_off_t case appears to be unused ...at least for my clang-cl Windows x86-64 build (see comments at <https://gerrit.libreoffice.org/c/core/+/124452/5#message-10cc4dfb88a258e59f09c5fbf413052aa9ddd49c> "ucb: webdav-curl: rewrite authentication loop for reentrancy") Change-Id: I4f6b255c6a9acb26844b7ef5c11f0f1fcf06b3df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124907 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx b/ucb/source/ucp/webdav-curl/CurlSession.cxx index f407ad1e7435..4deedeb752a5 100644 --- a/ucb/source/ucp/webdav-curl/CurlSession.cxx +++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx @@ -118,21 +118,15 @@ struct CurlOption enum class Type { Pointer, - Long, - CurlOffT + Long }; Type const Tag; union { void const* const pValue; long const lValue; - curl_off_t const cValue; }; #if 0 ::std::variant<void const*, long -#if SAL_TYPES_SIZEOFLONG == 4 - , - curl_off_t -#endif > const Value; #endif char const* const pExceptionString; @@ -153,14 +147,11 @@ struct CurlOption { } #if SAL_TYPES_SIZEOFLONG == 4 - CurlOption(CURLoption const i_Option, curl_off_t const i_Value, - char const* const i_pExceptionString) - : Option(i_Option) - , Tag(Type::CurlOffT) - , cValue(i_Value) - , pExceptionString(i_pExceptionString) - { - } + // According to mst this might get used "if one of the options to set stream size like + // CURLOPT_INFILESIZE_LARGE were used but it's not the case currently", so keep this ctor + // around as deleted in case it would ever becomes necessasy to extend Value with a curl_off_t + // case: + CurlOption(CURLoption, curl_off_t, char const*) = delete; #endif }; @@ -209,12 +200,6 @@ public: { rc = curl_easy_setopt(m_pCurl, it.Option, *pLong); } -#if SAL_TYPES_SIZEOFLONG == 4 - else if (curl_off_t const* const pOfft = ::std::get_if<curl_off_t>(&it.Value)) - { - rc = curl_easy_setopt(m_pCurl, it.Option, *pOfft); - } -#endif #endif if (it.Tag == CurlOption::Type::Pointer) { @@ -224,12 +209,6 @@ public: { rc = curl_easy_setopt(m_pCurl, it.Option, it.lValue); } -#if SAL_TYPES_SIZEOFLONG == 4 - else if (it.Tag == CurlOption::Type::CurlOffT) - { - rc = curl_easy_setopt(m_pCurl, it.Option, it.cValue); - } -#endif else { assert(false); @@ -267,12 +246,6 @@ public: { rc = curl_easy_setopt(m_pCurl, it.Option, 0L); } -#if SAL_TYPES_SIZEOFLONG == 4 - else if (curl_off_t const* const pOfft = ::std::get_if<curl_off_t>(&it.Value)) - { - rc = curl_easy_setopt(m_pCurl, it.Option, curl_off_t(0)); - } -#endif #endif if (it.Tag == CurlOption::Type::Pointer) { @@ -282,12 +255,6 @@ public: { rc = curl_easy_setopt(m_pCurl, it.Option, 0L); } -#if SAL_TYPES_SIZEOFLONG == 4 - else if (it.Tag == CurlOption::Type::CurlOffT) - { - rc = curl_easy_setopt(m_pCurl, it.Option, curl_off_t(0)); - } -#endif else { assert(false);