Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: enable -Wcast-qual flag for libcrypto=awslc #4735

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,7 @@ endif()

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")

if (NOT $ENV{S2N_LIBCRYPTO} MATCHES "awslc")
# add cast-qual back in for non AWS-LC
target_compile_options(${PROJECT_NAME} PRIVATE -Wcast-qual)
endif()
target_compile_options(${PROJECT_NAME} PRIVATE -Wcast-qual)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there still a reason to have this flag separated from all of the other flags? I wonder if it should just be added to the rest of the options:

s2n-tls/CMakeLists.txt

Lines 137 to 140 in ada65a7

target_compile_options(${PROJECT_NAME} PRIVATE -pedantic -std=gnu99 -Wall -Wimplicit -Wunused -Wcomment -Wchar-subscripts
-Wuninitialized -Wshadow -Wcast-align -Wwrite-strings -Wno-deprecated-declarations -Wno-unknown-pragmas -Wformat-security
-Wno-missing-braces -Wsign-compare -Wno-strict-prototypes -Wa,--noexecstack
)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The readability will be improved if we put the flag into all of this. I will add -Wcast-qual to this part.


if (COVERAGE)
# https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER_ID.html
Expand Down
Loading