You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by "bneradt (via GitHub)" <gi...@apache.org> on 2023/07/15 20:54:46 UTC
[GitHub] [trafficserver] bneradt opened a new pull request, #10050: cmake: -Wall -Wextra -werror
bneradt opened a new pull request, #10050:
URL: https://github.com/apache/trafficserver/pull/10050
This turns on -Wall -Wextra -werror and fixes the associated compiler warnings.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] JosiahWI commented on a diff in pull request #10050: cmake: -Wall -Wextra flags
Posted by "JosiahWI (via GitHub)" <gi...@apache.org>.
JosiahWI commented on code in PR #10050:
URL: https://github.com/apache/trafficserver/pull/10050#discussion_r1265203234
##########
CMakeLists.txt:
##########
@@ -335,6 +335,13 @@ if (OPENSSL_FOUND)
endif(OPENSSL_FOUND)
add_subdirectory(lib)
+
+# Keep this after lib because lib is made up of third party libraries, so if
+# there are warnings, we can't do anything about it.
+add_compile_options(-pipe -Wall -Wextra -Werror -Wno-unused-parameter -Wno-format-truncation -Wno-cast-function-type -Wno-stringop-overflow)
+add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-Wno-noexcept-type>)
+add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-Wsuggest-override>)
Review Comment:
```cmake
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:-Wno-except-type;-Wsuggest-override>")
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] JosiahWI commented on a diff in pull request #10050: cmake: -Wall -Wextra flags
Posted by "JosiahWI (via GitHub)" <gi...@apache.org>.
JosiahWI commented on code in PR #10050:
URL: https://github.com/apache/trafficserver/pull/10050#discussion_r1265203234
##########
CMakeLists.txt:
##########
@@ -335,6 +335,13 @@ if (OPENSSL_FOUND)
endif(OPENSSL_FOUND)
add_subdirectory(lib)
+
+# Keep this after lib because lib is made up of third party libraries, so if
+# there are warnings, we can't do anything about it.
+add_compile_options(-pipe -Wall -Wextra -Werror -Wno-unused-parameter -Wno-format-truncation -Wno-cast-function-type -Wno-stringop-overflow)
+add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-Wno-noexcept-type>)
+add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-Wsuggest-override>)
Review Comment:
```cmake
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:-Wno-except-type;-Wsuggest-override>"
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] bneradt commented on a diff in pull request #10050: cmake: -Wall -Wextra -werror
Posted by "bneradt (via GitHub)" <gi...@apache.org>.
bneradt commented on code in PR #10050:
URL: https://github.com/apache/trafficserver/pull/10050#discussion_r1264560173
##########
CMakeLists.txt:
##########
@@ -335,6 +335,13 @@ if (OPENSSL_FOUND)
endif(OPENSSL_FOUND)
add_subdirectory(lib)
+
+# Keep this after lib because lib is made up of third party libraries, so if
+# there are warnings, we can't do anything about it.
+add_compile_options(-pipe -Wall -Wextra -Werror -Wno-unused-parameter -Wno-format-truncation -Wno-cast-function-type -Wno-stringop-overflow)
+add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-Wno-noexcept-type>)
+add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-Wsuggest-override>)
Review Comment:
I could not figure out how to add two options to a generator like this without calling add_compile_options twice. I tried a variety of quoting permutations, but nothing worked. If someone else can figure it out, I'll pull it in.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] bneradt commented on a diff in pull request #10050: cmake: -Wall -Wextra flags
Posted by "bneradt (via GitHub)" <gi...@apache.org>.
bneradt commented on code in PR #10050:
URL: https://github.com/apache/trafficserver/pull/10050#discussion_r1265499013
##########
CMakeLists.txt:
##########
@@ -335,6 +335,13 @@ if (OPENSSL_FOUND)
endif(OPENSSL_FOUND)
add_subdirectory(lib)
+
+# Keep this after lib because lib is made up of third party libraries, so if
+# there are warnings, we can't do anything about it.
+add_compile_options(-pipe -Wall -Wextra -Werror -Wno-unused-parameter -Wno-format-truncation -Wno-cast-function-type -Wno-stringop-overflow)
+add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-Wno-noexcept-type>)
+add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-Wsuggest-override>)
Review Comment:
Thank you!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] bneradt merged pull request #10050: cmake: -Wall -Wextra flags
Posted by "bneradt (via GitHub)" <gi...@apache.org>.
bneradt merged PR #10050:
URL: https://github.com/apache/trafficserver/pull/10050
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] JosiahWI commented on a diff in pull request #10050: cmake: -Wall -Wextra flags
Posted by "JosiahWI (via GitHub)" <gi...@apache.org>.
JosiahWI commented on code in PR #10050:
URL: https://github.com/apache/trafficserver/pull/10050#discussion_r1265509626
##########
src/tscpp/util/unit_tests/test_IntrusiveDList.cc:
##########
@@ -284,7 +284,7 @@ TEST_CASE("IntrusiveDList", "[libtscpputil][IntrusiveDList]")
REQUIRE(list.tail()->_payload == "trailer");
PrivateThingList priv_list;
- for (int i = 1; i <= 23; ++i) {
+ for (unsigned int i = 1; i <= 23; ++i) {
Review Comment:
```suggestion
for (std::size_t i = 1; i <= 23; ++i) {
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org