Skip to content

Commit

Permalink
fix thread sanitizer issue
Browse files Browse the repository at this point in the history
For some reason, this unused variable causes thread sanitizer to
complain on destruction of the std::string. Simple enough to remove.

Signed-off-by: Rosen Penev <[email protected]>
  • Loading branch information
neheb committed Feb 25, 2025
1 parent 72d9b4a commit 92d711e
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/basicio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1568,11 +1568,9 @@ CurlIo::CurlImpl::CurlImpl(const std::string& url, size_t blockSize) : Impl(url,

int64_t CurlIo::CurlImpl::getFileLength() {
curl_easy_reset(curl_); // reset all options
std::string response;
curl_easy_setopt(curl_, CURLOPT_URL, path_.c_str());
curl_easy_setopt(curl_, CURLOPT_NOBODY, 1); // HEAD
curl_easy_setopt(curl_, CURLOPT_WRITEFUNCTION, curlWriter);
curl_easy_setopt(curl_, CURLOPT_WRITEDATA, &response);
curl_easy_setopt(curl_, CURLOPT_SSL_VERIFYPEER, 0L);
curl_easy_setopt(curl_, CURLOPT_SSL_VERIFYHOST, 0L);
curl_easy_setopt(curl_, CURLOPT_CONNECTTIMEOUT, timeout_);
Expand Down

0 comments on commit 92d711e

Please sign in to comment.