Skip to content

warning for 'type' may be used uninitialiized#9746

Merged
douzzer merged 1 commit intowolfSSL:masterfrom
JacobBarthelmeh:wolfhsm
Feb 6, 2026
Merged

warning for 'type' may be used uninitialiized#9746
douzzer merged 1 commit intowolfSSL:masterfrom
JacobBarthelmeh:wolfhsm

Conversation

@JacobBarthelmeh
Copy link
Contributor

@JacobBarthelmeh JacobBarthelmeh commented Feb 6, 2026

Warning seen when running wolfHSM GitHub actions test (https://github.com/wolfSSL/wolfHSM/actions/runs/21739337416/job/62711340285?pr=270).

cc  -std=c90 -Werror -Wall -Wextra -ffunction-sections -fdata-sections -O2 -D_POSIX_C_SOURCE=200809L -DWOLFSSL_USER_SETTINGS -DWOLFHSM_CFG -DWOLFHSM_CFG_TEST_POSIX -DWOLFHSM_CFG_DMA -I. -I./config -I./bench_modules -I../wolfssl -I../ -I..//port/posix -c -o Build/ssl.o ../wolfssl/src/ssl.c
In file included from ../wolfssl/wolfssl/wolfcrypt/libwolfssl_sources.h:46,
                 from ../wolfssl/src/ssl.c:22:
In function ‘check_cert_key_dev’,
    inlined from ‘check_cert_key.constprop’ at ../wolfssl/src/ssl_api_pk.c:241:19:
../wolfssl/wolfssl/wolfcrypt/types.h:765:21: error: ‘type’ may be used uninitialized [-Werror=maybe-uninitialized]
  765 |                     wolfSSL_Free(xp, h, t); } while (0)
      |                     ^~~~~~~~~~~~~~~~~~~~~~
../wolfssl/src/ssl_api_pk.c:183:5: note: in expansion of macro ‘XFREE’
  183 |     XFREE(pkey, heap, type);
      |     ^~~~~
In file included from ../wolfssl/src/ssl.c:198:
../wolfssl/src/ssl_api_pk.c: In function ‘check_cert_key.constprop’:
../wolfssl/src/ssl_api_pk.c:54:9: note: ‘type’ was declared here
   54 |     int type;
      |         ^~~~
cc1: all warnings being treated as errors
make: *** [Makefile:193: Build/ssl.o] Error 1

@JacobBarthelmeh JacobBarthelmeh self-assigned this Feb 6, 2026
@JacobBarthelmeh
Copy link
Contributor Author

Retest this please Jenkins FIPS 140-3 test

@douzzer douzzer merged commit 8726611 into wolfSSL:master Feb 6, 2026
420 checks passed
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.

4 participants