From cb13a39253848ece442971301ade9c09d98bf08e Mon Sep 17 00:00:00 2001 From: Ed Tanous Date: Sat, 25 Jul 2020 19:02:03 +0000 Subject: Enable unused variable warnings and resolve This commit enables the "unused variables" warning in clang. Throughout this, it did point out several issues that would've been functional bugs, so I think it was worthwhile. It also cleaned up several unused variable from old constructs that no longer exist. Tested: Built with clang. Code no longer emits warnings. Downloaded bmcweb to system and pulled up the webui, observed webui loads and logs in properly. Change-Id: I51505f4222cc147d6f2b87b14d7e2ac4a74cafa8 Signed-off-by: Ed Tanous --- include/image_upload.hpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'include/image_upload.hpp') diff --git a/include/image_upload.hpp b/include/image_upload.hpp index a135af952b..9d0a0ca921 100644 --- a/include/image_upload.hpp +++ b/include/image_upload.hpp @@ -18,8 +18,7 @@ namespace image_upload static std::unique_ptr fwUpdateMatcher; -inline void uploadImageHandler(const crow::Request& req, crow::Response& res, - const std::string& filename) +inline void uploadImageHandler(const crow::Request& req, crow::Response& res) { // Only allow one FW update at a time if (fwUpdateMatcher != nullptr) @@ -115,15 +114,13 @@ inline void requestRoutes(App& app) .privileges({"ConfigureComponents", "ConfigureManager"}) .methods(boost::beast::http::verb::post, boost::beast::http::verb::put)( [](const crow::Request& req, crow::Response& res, - const std::string& filename) { - uploadImageHandler(req, res, filename); - }); + const std::string&) { uploadImageHandler(req, res); }); BMCWEB_ROUTE(app, "/upload/image") .privileges({"ConfigureComponents", "ConfigureManager"}) .methods(boost::beast::http::verb::post, boost::beast::http::verb::put)( [](const crow::Request& req, crow::Response& res) { - uploadImageHandler(req, res, ""); + uploadImageHandler(req, res); }); } } // namespace image_upload -- cgit v1.2.3