From 23a21a1cbed23ace4174664950e595df961e9e69 Mon Sep 17 00:00:00 2001 From: Ed Tanous Date: Sat, 25 Jul 2020 04:45:05 +0000 Subject: Enable clang warnings This commit enables clang warnings, and fixes all warnings that were found. Most of these fall into a couple categories: Variable shadow issues were fixed by renaming variables unused parameter warnings were resolved by either checking error codes that had been ignored, or removing the name of the variable from the scope. Other various warnings were fixed in the best way I was able to come up with. Note, the redfish Node class is especially insidious, as it causes all imlementers to have variables for parameters, regardless of whether or not they are used. Deprecating the Node class is on my list of things to do, as it adds extra overhead, and in general isn't a useful abstraction. For now, I have simply fixed all the handlers. Tested: Added the current meta-clang meta layer into bblayers.conf, and added TOOLCHAIN_pn-bmcweb = "clang" to my local.conf Signed-off-by: Ed Tanous Change-Id: Ia75b94010359170159c703e535d1c1af182fe700 --- include/async_resp.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/async_resp.hpp') diff --git a/include/async_resp.hpp b/include/async_resp.hpp index f596dcdd20..8267c47617 100644 --- a/include/async_resp.hpp +++ b/include/async_resp.hpp @@ -31,7 +31,7 @@ class AsyncResp } crow::Response& res; - std::function func = 0; + std::function func; }; } // namespace bmcweb -- cgit v1.2.3