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

Add a broader set of compile flags. #155

Merged
merged 10 commits into from
May 19, 2021
Merged

Conversation

bryce-shang
Copy link
Contributor

@bryce-shang bryce-shang commented May 18, 2021

Issues:

Resolves CryptoAlg-626

Description of changes:

This PR added a broader set of compile flags in ./CMakeLists.txt.

Some compiler warnings are fixed in this PR:

  • ISO C does not support ‘__int128’ types [-Werror=pedantic].
  • ISO C99 doesn’t support unnamed structs/unions [-Werror=pedantic].
    • Added a name to the union.

Call-outs:

  • -Wpedantic is not enabled to avoid c99 warnings.
    • One warning is CryptoAlg-626?selectedConversation=763115b6-a861-42f9-9fa5-acea8cbcb825.
    • CryptoAlg-759 is created to clarify if all code need to follow c99 spec.
  • -Wno-unused-parameter is added instead of using OPENSSL_UNUSED because
    • Fixing warnings using later macro will cause more merge conflicts.
    • Some unused parameters are because not all implementations need to use all function parameters.
    • Both are just to suppress the warnings.
  • -Wcast-qual is not enabled because it causes lots of false positive.
    • For example, the compiler warns const ptr is cast to ptr on macro BORINGSSL_DEFINE_STACK_OF_IMPL.
      • The compiler does not check the macro use const ptr for constptrtype.
      • The error message is linked in CryptoAlg-626?selectedConversation=5c2b0ef7-1f27-4f49-887f-7e298bf18b83
  • -Wno-cast-function-type is added when the compiler is gcc8.

Testing:

How is this change tested (unit tests, fuzz tests, etc.)? Are there any testing steps to be verified by the reviewer?

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

@bryce-shang
Copy link
Contributor Author

Make this PR as a draft. CI detects more warnings reported by the build flags due to gcc8x and aarch.

@bryce-shang bryce-shang marked this pull request as draft May 18, 2021 04:05
@bryce-shang bryce-shang marked this pull request as ready for review May 18, 2021 21:10
@bryce-shang bryce-shang merged commit 53e6416 into aws:main May 19, 2021
@bryce-shang bryce-shang deleted the build-flags branch May 19, 2021 16:42
WillChilds-Klein pushed a commit to WillChilds-Klein/aws-lc that referenced this pull request Mar 9, 2022
torben-hansen pushed a commit that referenced this pull request Nov 8, 2024
silence -Werror,-Wcast-function-type-mismatch in crypto/rand_extra/windows.c.
extend -Wno-cast-function-type to clang versions supporting it.
Should address https://gitlab.gnome.org/GNOME/gnome-terminal/-/issues/96 also for clang builds.
Ref: Add a broader set of compile flags. #155
WillChilds-Klein pushed a commit to WillChilds-Klein/aws-lc that referenced this pull request Jan 8, 2025
* develop:
  Support testing against JDK17 (aws#165)
  Add assumeMinimumVersion to InputBuffer tests (aws#160)
  Update CHANGELOG for 1.6.1 (aws#158)
  Fix issue with hashing (aws#157)
  Improve the README (aws#155)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants