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

[bug] Wunused-private-field with Clang #134

Closed
Carbenium opened this issue Mar 4, 2021 · 1 comment · Fixed by #136
Closed

[bug] Wunused-private-field with Clang #134

Carbenium opened this issue Mar 4, 2021 · 1 comment · Fixed by #136
Assignees
Labels

Comments

@Carbenium
Copy link

Describe the bug
The following warning is shown during build:

/tmp/cirrus-ci-build/dep/jwt-cpp/include/jwt-cpp/jwt.h:1177:20: warning: private field 'md' is not used [-Wunused-private-field]
                        const EVP_MD* (*md)();

Desktop:

  • OS: FreeBSD 12.2
  • Compiler clang 10.0.1
  • Version 0.5.0 (b45bc99)
@prince-chrismc
Copy link
Collaborator

Thanks for reporting the warning, that's always suspicious. 🤔

Typically the md is used to setup the "digest context" but in the case of eddsa it uses

if (!EVP_DigestSignInit(ctx.get(), nullptr, nullptr, nullptr, pkey.get())) {

and the man pages say

Ed25519 and Ed448
Support no digests (the digest type must be NULL)

This might be some copy paste since they do set it to EVP_sha256

Carbenium added a commit to Carbenium/zoneminder that referenced this issue Apr 11, 2021
Update to 4620bf43befea5ef69816fb8610723232a609030.
This fixes a Wunused-private-field warning reported in Thalhammer/jwt-cpp#134
Carbenium added a commit to Carbenium/zoneminder that referenced this issue Apr 11, 2021
Update to 4620bf43befea5ef69816fb8610723232a609030.
This fixes a Wunused-private-field warning reported in Thalhammer/jwt-cpp#134
Carbenium added a commit to Carbenium/zoneminder that referenced this issue Apr 11, 2021
Update to 4620bf43befea5ef69816fb8610723232a609030.
This fixes a Wunused-private-field warning reported in Thalhammer/jwt-cpp#134
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 a pull request may close this issue.

2 participants