summaryrefslogtreecommitdiff
path: root/src/webserver_main.cpp
diff options
context:
space:
mode:
authorEd Tanous <ed@tanous.net>2020-07-25 07:45:05 +0300
committerEd Tanous <ed@tanous.net>2020-08-17 23:54:37 +0300
commit23a21a1cbed23ace4174664950e595df961e9e69 (patch)
tree12e7cc9d9301642fc1e48332a0e0834c54e8c8af /src/webserver_main.cpp
parent52cc112d962920b035c870127784bcbd98948fad (diff)
downloadbmcweb-23a21a1cbed23ace4174664950e595df961e9e69.tar.xz
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 <ed@tanous.net> Change-Id: Ia75b94010359170159c703e535d1c1af182fe700
Diffstat (limited to 'src/webserver_main.cpp')
-rw-r--r--src/webserver_main.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/webserver_main.cpp b/src/webserver_main.cpp
index 2e043d77c7..b626f5b0a2 100644
--- a/src/webserver_main.cpp
+++ b/src/webserver_main.cpp
@@ -32,7 +32,7 @@
constexpr int defaultPort = 18080;
-void setupSocket(crow::App& app)
+inline void setupSocket(crow::App& app)
{
int listenFd = sd_listen_fds(0);
if (1 == listenFd)
@@ -107,7 +107,6 @@ int main(int argc, char** argv)
crow::login_routes::requestRoutes(app);
- BMCWEB_LOG_INFO << "bmcweb (" << __DATE__ << ": " << __TIME__ << ')';
setupSocket(app);
crow::connections::systemBus =