Skip to content

Commit e0f72ed

Browse files
committed
enable additional warnings and error on warning
1 parent 72f08b0 commit e0f72ed

39 files changed

+122
-75
lines changed

configure.ac

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@ AM_LDFLAGS="-lstdc++"
194194

195195
if test x"$debugit" = x"yes"; then
196196
AC_DEFINE([DEBUG],[],[Debug Mode])
197-
AM_CXXFLAGS="$AM_CXXFLAGS -DDEBUG -g -Wall -Wno-uninitialized -O0"
198-
AM_CFLAGS="$AM_CXXFLAGS -DDEBUG -g -Wall -Wno-uninitialized -O0"
197+
AM_CXXFLAGS="$AM_CXXFLAGS -DDEBUG -g -Wall -Wextra -Werror -pedantic -std=c++14 -O0"
198+
AM_CFLAGS="$AM_CXXFLAGS -DDEBUG -g -Wall -Wextra -Werror -pedantic -O0"
199199
else
200200
AC_DEFINE([NDEBUG],[],[No-debug Mode])
201201
AM_CXXFLAGS="$AM_CXXFLAGS -O3"

examples/allowing_disallowing_methods.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class hello_world_resource : public httpserver::http_resource {
2727
}
2828
};
2929

30-
int main(int argc, char** argv) {
30+
int main() {
3131
httpserver::webserver ws = httpserver::create_webserver(8080);
3232

3333
hello_world_resource hwr;

examples/basic_authentication.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class user_pass_resource : public httpserver::http_resource {
3131
}
3232
};
3333

34-
int main(int argc, char** argv) {
34+
int main() {
3535
httpserver::webserver ws = httpserver::create_webserver(8080);
3636

3737
user_pass_resource hwr;

examples/benchmark_nodelay.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ class hello_world_resource : public httpserver::http_resource {
4141
};
4242

4343
int main(int argc, char** argv) {
44+
std::ignore = argc;
45+
4446
httpserver::webserver ws = httpserver::create_webserver(atoi(argv[1]))
4547
.start_method(httpserver::http::http_utils::INTERNAL_SELECT)
4648
.tcp_nodelay()

examples/benchmark_select.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ class hello_world_resource : public httpserver::http_resource {
4141
};
4242

4343
int main(int argc, char** argv) {
44+
std::ignore = argc;
45+
4446
httpserver::webserver ws = httpserver::create_webserver(atoi(argv[1]))
4547
.start_method(httpserver::http::http_utils::INTERNAL_SELECT)
4648
.max_threads(atoi(argv[2]));

examples/benchmark_threads.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ class hello_world_resource : public httpserver::http_resource {
4141
};
4242

4343
int main(int argc, char** argv) {
44+
std::ignore = argc;
45+
4446
httpserver::webserver ws = httpserver::create_webserver(atoi(argv[1]))
4547
.start_method(httpserver::http::http_utils::THREAD_PER_CONNECTION);
4648

examples/custom_access_log.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class hello_world_resource : public httpserver::http_resource {
3333
}
3434
};
3535

36-
int main(int argc, char** argv) {
36+
int main() {
3737
httpserver::webserver ws = httpserver::create_webserver(8080)
3838
.log_access(custom_access_log);
3939

examples/custom_error.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020

2121
#include <httpserver.hpp>
2222

23-
const std::shared_ptr<httpserver::http_response> not_found_custom(const httpserver::http_request& req) {
23+
const std::shared_ptr<httpserver::http_response> not_found_custom(const httpserver::http_request&) {
2424
return std::shared_ptr<httpserver::string_response>(new httpserver::string_response("Not found custom", 404, "text/plain"));
2525
}
2626

27-
const std::shared_ptr<httpserver::http_response> not_allowed_custom(const httpserver::http_request& req) {
27+
const std::shared_ptr<httpserver::http_response> not_allowed_custom(const httpserver::http_request&) {
2828
return std::shared_ptr<httpserver::string_response>(new httpserver::string_response("Not allowed custom", 405, "text/plain"));
2929
}
3030

@@ -35,7 +35,7 @@ class hello_world_resource : public httpserver::http_resource {
3535
}
3636
};
3737

38-
int main(int argc, char** argv) {
38+
int main() {
3939
httpserver::webserver ws = httpserver::create_webserver(8080)
4040
.not_found_resource(not_found_custom)
4141
.method_not_allowed_resource(not_allowed_custom);

examples/deferred_with_accumulator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ ssize_t test_callback(std::shared_ptr<std::atomic<int> > closure_data, char* buf
5656

5757
class deferred_resource : public httpserver::http_resource {
5858
public:
59-
const std::shared_ptr<httpserver::http_response> render_GET(const httpserver::http_request& req) {
59+
const std::shared_ptr<httpserver::http_response> render_GET(const httpserver::http_request&) {
6060
std::shared_ptr<std::atomic<int> > closure_data(new std::atomic<int>(counter++));
6161
return std::shared_ptr<httpserver::deferred_response<std::atomic<int> > >(new httpserver::deferred_response<std::atomic<int> >(test_callback, closure_data, "cycle callback response"));
6262
}
6363
};
6464

65-
int main(int argc, char** argv) {
65+
int main() {
6666
httpserver::webserver ws = httpserver::create_webserver(8080);
6767

6868
deferred_resource hwr;

examples/digest_authentication.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class digest_resource : public httpserver::http_resource {
3737
}
3838
};
3939

40-
int main(int argc, char** argv) {
40+
int main() {
4141
httpserver::webserver ws = httpserver::create_webserver(8080);
4242

4343
digest_resource hwr;

0 commit comments

Comments
 (0)