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

pkg/wolfssl: fix compilation with GCC >= 12.x [backport 2022.10] #18898

Merged
merged 1 commit into from
Nov 12, 2022

Conversation

maribu
Copy link
Member

@maribu maribu commented Nov 12, 2022

Backport of #18873

Contribution description

This fixes a signature mismatch between forward declaration and implementation, which in turn fixes the following error during compilation:

/home/maribu/Repos/software/RIOT/build/pkg/wolfssl/wolfcrypt/src/ge_low_mem.c:179:30: error: argument 1 of type 'unsigned char[64]' with mismatched bound [-Werror=array-parameter=]
  179 | void sc_reduce(unsigned char x[64])
      |                ~~~~~~~~~~~~~~^~~~~
In file included from /home/maribu/Repos/software/RIOT/build/pkg/wolfssl/wolfcrypt/src/ge_low_mem.c:34:
/home/maribu/Repos/software/RIOT/build/pkg/wolfssl/wolfssl/wolfcrypt/ge_operations.h:81:36: note: previously declared as 'byte *' {aka 'unsigned char *'}
   81 | WOLFSSL_LOCAL void sc_reduce(byte* s);
      |                              ~~~~~~^

Testing procedure

The following test applications should now compile with modern GCC versions:

  • tests/pkg_wolfcrypt-ed25519-verify
  • tests/pkg_wolfssl

Issues/PRs references

None

@maribu maribu added Area: pkg Area: External package ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer Process: release backport Integration Process: The PR is a release backport of a change previously provided to master Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) labels Nov 12, 2022
@maribu maribu requested a review from benpicco November 12, 2022 15:08
@maribu
Copy link
Member Author

maribu commented Nov 12, 2022

TODO: Wait for #18897 to be merged, rebase, then re-enable the CI

@maribu maribu removed the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Nov 12, 2022
This fixes a signature mismatch between forward declaration and
implementation, which in turn fixes the following error during
compilation:

    /home/maribu/Repos/software/RIOT/build/pkg/wolfssl/wolfcrypt/src/ge_low_mem.c:179:30: error: argument 1 of type 'unsigned char[64]' with mismatched bound [-Werror=array-parameter=]
      179 | void sc_reduce(unsigned char x[64])
          |                ~~~~~~~~~~~~~~^~~~~
    In file included from /home/maribu/Repos/software/RIOT/build/pkg/wolfssl/wolfcrypt/src/ge_low_mem.c:34:
    /home/maribu/Repos/software/RIOT/build/pkg/wolfssl/wolfssl/wolfcrypt/ge_operations.h:81:36: note: previously declared as 'byte *' {aka 'unsigned char *'}
       81 | WOLFSSL_LOCAL void sc_reduce(byte* s);
          |                              ~~~~~~^

(cherry picked from commit f70eafa)
@maribu maribu force-pushed the backport/2022.10/pkg/wolfssl branch from c1c688c to dcf4259 Compare November 12, 2022 16:55
@maribu maribu added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Nov 12, 2022
@riot-ci
Copy link

riot-ci commented Nov 12, 2022

Murdock results

✔️ PASSED

dcf4259 pkg/wolfssl: fix compilation with GCC >= 12.x

Success Failures Total Runtime
1983 0 1983 05m:51s

Artifacts

This only reflects a subset of all builds from https://ci-prod.riot-os.org. Please refer to https://ci.riot-os.org for a complete build for now.

@maribu maribu enabled auto-merge November 12, 2022 20:34
@maribu maribu merged commit 5430fbe into RIOT-OS:2022.10-branch Nov 12, 2022
@maribu maribu deleted the backport/2022.10/pkg/wolfssl branch April 25, 2023 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: pkg Area: External package ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer Process: release backport Integration Process: The PR is a release backport of a change previously provided to master Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants