Suppress some compiler warnings, fix few possible bugs. (#6224)

* Supress warnings on unused functions an variables

Compilation of OrcaSlicer produces 3056 warnings.
Nearly half of them related to unused functions and variables.

It is unlikely we going to clean them up since we may want to
keep code base as close to the BBS as possible

* initialize class member with correct value

* Fix memset arguments order

* Merge multiple statemensts into single

* fix -Wpessimizing-move
This commit is contained in:
Dima Buzdyk
2024-08-02 20:56:23 +06:00
committed by GitHub
parent de76e36e31
commit 2dba699a42
6 changed files with 16 additions and 14 deletions

View File

@@ -58,7 +58,7 @@ bool ESP3D::upload(PrintHostUpload upload_data, ProgressFn prorgess_fn, ErrorFn
std::string short_name = get_short_name(upload_data.upload_path.string());
bool res = false;
auto http = Http::post(std::move((boost::format("http://%1%/upload_serial") % m_host).str()));
auto http = Http::post((boost::format("http://%1%/upload_serial") % m_host).str());
http.header("Connection", "keep-alive")
.form_add_file("file", upload_data.source_path, short_name)
.on_complete([&](std::string body, unsigned status) {
@@ -171,4 +171,4 @@ std::string ESP3D::format_command(const std::string& path, const std::string& ar
return (boost::format("http://%1%%2%?%3%=%4%") % m_host % path % arg % val).str();
}
} // namespace Slic3r
} // namespace Slic3r