build: fix 9 defects found by clang-cl warnings (#15583)

This commit is contained in:
Kris Austin
2026-09-09 19:13:05 -03:00
committed by GitHub
parent dbeef900cc
commit e296d5daac
9 changed files with 13 additions and 10 deletions
+3 -1
View File
@@ -321,8 +321,10 @@ void Http::priv::form_add_file(const char *name, const fs::path &path, const cha
// We can't use CURLFORM_FILECONTENT, because curl doesn't support Unicode filenames on Windows
// and so we use CURLFORM_STREAM with boost ifstream to read the file.
std::string filename_str;
if (filename == nullptr) {
filename = path.string().c_str();
filename_str = path.string();
filename = filename_str.c_str();
}
form_files.emplace_back(path, offset, length);