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

Conversation

boquan-fang
Copy link
Contributor

Resolved issues:

Resolve issue #4710

Description of changes:

  • Remove the condition which only add -Wcast-qual back for non AWS-lc Libcrypto.

Call-outs:

  • Waiting for awslc update for ubuntu18.

Testing:

  • Local testing without specifying S2N_LIBCRYPTO=openssl.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

* Remove the condition which only add -Wcast-qual back for non AWS-lc
  Libcrypto.
# 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.

@lrstewart lrstewart requested review from lrstewart and removed request for dougch August 27, 2024 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants