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 missing cast #8191

Merged
merged 2 commits into from
Nov 15, 2024
Merged

Fix missing cast #8191

merged 2 commits into from
Nov 15, 2024

Conversation

bandi13
Copy link
Contributor

@bandi13 bandi13 commented Nov 15, 2024

Description

Introduced in PR #8176. Shows up in wolfSSL/job/nightly-g++-test-v2/1399/parsed_console/ test.

In file included from tests/api.c:32:
tests/api.c: In function ‘int test_wolfSSL_X509V3_EXT_aia()’:

tests/api.c:76350:47: error: invalid conversion from ‘void*’ to ‘WOLFSSL_AUTHORITY_INFO_ACCESS*’ {aka ‘WOLFSSL_STACK*’} [-fpermissive]
76350 |     ExpectNotNull(aia = wolfSSL_X509V3_EXT_d2i(ext));
      |                         ~~~~~~~~~~~~~~~~~~~~~~^~~~~
      |                                               |
      |                                               void*
./tests/unit.h:182:15: note: in definition of macro ‘Expect’
  182 |         if (!(test))                                                         \
      |               ^~~~
tests/api.c:76350:5: note: in expansion of macro ‘ExpectNotNull’
76350 |     ExpectNotNull(aia = wolfSSL_X509V3_EXT_d2i(ext));
      |     ^~~~~~~~~~~~~

tests/api.c:76370:47: error: invalid conversion from ‘void*’ to ‘WOLFSSL_AUTHORITY_INFO_ACCESS*’ {aka ‘WOLFSSL_STACK*’} [-fpermissive]
76370 |     ExpectNotNull(aia = wolfSSL_X509V3_EXT_d2i(ext));
      |                         ~~~~~~~~~~~~~~~~~~~~~~^~~~~
      |                                               |
      |                                               void*
./tests/unit.h:182:15: note: in definition of macro ‘Expect’
  182 |         if (!(test))                                                         \
      |               ^~~~
tests/api.c:76370:5: note: in expansion of macro ‘ExpectNotNull’
76370 |     ExpectNotNull(aia = wolfSSL_X509V3_EXT_d2i(ext));
      |     ^~~~~~~~~~~~~

Testing

Tested patch on same server which can reproduce it.

Introduced in PR#8176.
dgarske
dgarske previously approved these changes Nov 15, 2024
In file included from ./wolfssl/error-ssl.h:27,
                 from ./wolfssl/ssl.h:35,
                 from ./wolfssl/internal.h:28,
                 from src/ssl.c:36:
./src/x509_str.c: In function 'int X509StoreLoadCertBuffer(WOLFSSL_X509_STORE*, byte*, word32, int)':
./wolfssl/wolfcrypt/error-crypt.h:336:37: error: 'CONST_NUM_ERR_WOLFSSL_SUCCESS' was not declared in this scope; did you mean 'CONST_NUM_ERR_WOLFSSL_UNKNOWN'?
  336 |     #define WC_NO_ERR_TRACE(label) (CONST_NUM_ERR_ ## label)
      |                                     ^~~~~~~~~~~~~~
./src/x509_str.c:1456:15: note: in expansion of macro 'WC_NO_ERR_TRACE'
 1456 |     int ret = WC_NO_ERR_TRACE(WOLFSSL_SUCCESS);
      |               ^~~~~~~~~~~~~~~
@dgarske dgarske merged commit 3b83732 into wolfSSL:master Nov 15, 2024
143 checks passed
@bandi13 bandi13 deleted the fixTest branch November 18, 2024 17:45
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