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 discarded-qualifiers warning #3108

Closed
wants to merge 1 commit into from
Closed

fix discarded-qualifiers warning #3108

wants to merge 1 commit into from

Conversation

toidiu
Copy link
Contributor

@toidiu toidiu commented Nov 1, 2021

Resolved issues:

resolves #ISSUE-NUMBER1, resolves #ISSUE-NUMBER2, etc.

Description of changes:

New version of clang as seeing new failures due to -Werror=discarded-qualifiers. This PR fixes those warnings.

make: warning: -j2 forced in submake: resetting jobserver mode.
  /home/runner/work/s2n-quic/s2n-quic/tls/s2n-tls-sys/s2n/crypto/s2n_rsa_pss.c: In function ‘s2n_evp_pkey_to_rsa_pss_public_key’:
  /home/runner/work/s2n-quic/s2n-quic/tls/s2n-tls-sys/s2n/crypto/s2n_rsa_pss.c:185:24: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
    185 |     RSA *pub_rsa_key = EVP_PKEY_get0_RSA(pkey);
        |                        ^~~~~~~~~~~~~~~~~
  /home/runner/work/s2n-quic/s2n-quic/tls/s2n-tls-sys/s2n/crypto/s2n_rsa_pss.c: In function ‘s2n_evp_pkey_to_rsa_pss_private_key’:
  /home/runner/work/s2n-quic/s2n-quic/tls/s2n-tls-sys/s2n/crypto/s2n_rsa_pss.c:195:25: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
    195 |     RSA *priv_rsa_key = EVP_PKEY_get0_RSA(pkey);
        |                         ^~~~~~~~~~~~~~~~~
  cc1: all warnings being treated as errors
  make[2]: *** [CMakeFiles/s2n.dir/build.make:356: CMakeFiles/s2n.dir/crypto/s2n_rsa_pss.c.o] Error 1
  make[2]: *** Waiting for unfinished jobs....
  make[1]: *** [CMakeFiles/Makefile2:3910: CMakeFiles/s2n.dir/all] Error 2
  make: *** [Makefile:146: all] Error 2
  thread 'main' panicked at '
  command did not execute successfully, got: exit status: 2

Call-outs:

Address any potentially confusing code. Is there code added that needs to be cleaned up later? Is there code that is missing because it’s still in development?

Testing:

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

Is this a refactor change? If so, how have you proved that the intended behavior hasn't changed?

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

@toidiu toidiu closed this Nov 1, 2021
@toidiu toidiu deleted the ak-const branch April 24, 2022 23:21
@tv-deusen
Copy link

I'm facing this issue trying to build a small program using s2n-quic v1.0. Are there any resolutions for this?

@camshaft
Copy link
Contributor

camshaft commented Oct 5, 2022

This issue should be fixed by #3474. You'll need to update to s2n-quic 1.9.2 if you want to pick up the changes.

@tv-deusen
Copy link

It appears 1.9.2 still has the same issue for me.

@camshaft
Copy link
Contributor

camshaft commented Oct 6, 2022

Can you open an issue in s2n-quic detailing your setup and the error message you're seeing?

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.

None yet

3 participants