Skip to content

Commit e58cfe8

Browse files
committed
Fixed warnings
1 parent 4fb2f51 commit e58cfe8

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

example/benchmark.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ struct StopWatch {
1818
chrono::system_clock::time_point start_;
1919
};
2020

21-
int main(int argc, char* argv[]) {
21+
int main(void) {
2222
string body(1024 * 5, 'a');
2323

2424
httplib::Client cli("httpbin.org", 80);

example/hello.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ int main(void)
1212
{
1313
Server svr;
1414

15-
svr.get("/hi", [](const auto& req, auto& res) {
15+
svr.get("/hi", [](const auto& /*req*/, auto& res) {
1616
res.set_content("Hello World!", "text/plain");
1717
});
1818

example/server.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,23 +72,23 @@ int main(void)
7272
Server svr;
7373
#endif
7474

75-
svr.get("/", [=](const auto& req, auto& res) {
75+
svr.get("/", [=](const auto& /*req*/, auto& res) {
7676
res.set_redirect("/hi");
7777
});
7878

79-
svr.get("/hi", [](const auto& req, auto& res) {
79+
svr.get("/hi", [](const auto& /*req*/, auto& res) {
8080
res.set_content("Hello World!", "text/plain");
8181
});
8282

8383
svr.get("/dump", [](const auto& req, auto& res) {
8484
res.set_content(dump_headers(req.headers), "text/plain");
8585
});
8686

87-
svr.get("/stop", [&](const auto& req, auto& res) {
87+
svr.get("/stop", [&](const auto& /*req*/, auto& /*res*/) {
8888
svr.stop();
8989
});
9090

91-
svr.set_error_handler([](const auto& req, auto& res) {
91+
svr.set_error_handler([](const auto& /*req*/, auto& res) {
9292
const char* fmt = "<p>Error Status: <span style='color:red;'>%d</span></p>";
9393
char buf[BUFSIZ];
9494
snprintf(buf, sizeof(buf), fmt, res.status);

0 commit comments

Comments
 (0)