diff --git a/example/benchmark.cc b/example/benchmark.cc index 7e3c3dd..9d09df1 100644 --- a/example/benchmark.cc +++ b/example/benchmark.cc @@ -18,7 +18,7 @@ struct StopWatch { chrono::system_clock::time_point start_; }; -int main(int argc, char* argv[]) { +int main(void) { string body(1024 * 5, 'a'); httplib::Client cli("httpbin.org", 80); diff --git a/example/hello.cc b/example/hello.cc index de6f4fb..3b0c7f6 100644 --- a/example/hello.cc +++ b/example/hello.cc @@ -12,7 +12,7 @@ int main(void) { Server svr; - svr.get("/hi", [](const auto& req, auto& res) { + svr.get("/hi", [](const auto& /*req*/, auto& res) { res.set_content("Hello World!", "text/plain"); }); diff --git a/example/server.cc b/example/server.cc index b6e348d..8e1f702 100644 --- a/example/server.cc +++ b/example/server.cc @@ -72,11 +72,11 @@ int main(void) Server svr; #endif - svr.get("/", [=](const auto& req, auto& res) { + svr.get("/", [=](const auto& /*req*/, auto& res) { res.set_redirect("/hi"); }); - svr.get("/hi", [](const auto& req, auto& res) { + svr.get("/hi", [](const auto& /*req*/, auto& res) { res.set_content("Hello World!", "text/plain"); }); @@ -84,11 +84,11 @@ int main(void) res.set_content(dump_headers(req.headers), "text/plain"); }); - svr.get("/stop", [&](const auto& req, auto& res) { + svr.get("/stop", [&](const auto& /*req*/, auto& /*res*/) { svr.stop(); }); - svr.set_error_handler([](const auto& req, auto& res) { + svr.set_error_handler([](const auto& /*req*/, auto& res) { const char* fmt = "

Error Status: %d

"; char buf[BUFSIZ]; snprintf(buf, sizeof(buf), fmt, res.status);