You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mbed TLS version (number or commit id): e5833c1
Operating system and version: Fedora 36
Configuration (if not default, please attach mbedtls_config.h):
Compiler and options (if you used a pre-built binary, please indicate how you obtained it):
Additional environment information:
Expected behavior
The build shall be clean. Looks like the test seem intended but one could set garbage data as initializer to silence the error.
Actual behavior
Steps to reproduce
clone new repo.
mkdir build.
cd build.
cmake ..
make
Additional information
Below is the compiler error:
[ 65%] Building C object tests/CMakeFiles/test_suite_ecdh.dir/test_suite_ecdh.c.o
/home/devnaga/work/mbedtls/tests/suites/test_suite_ecdh.function: In function‘test_ecdh_invalid_param’:
/home/devnaga/work/mbedtls/tests/suites/test_suite_ecdh.function:54:29: error: ‘kp’ may be used uninitialized [-Werror=maybe-uninitialized]
54 | mbedtls_ecdh_get_params( &ctx, &kp,
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/devnaga/work/mbedtls/tests/suites/test_suite_ecdh.function:2:
/home/devnaga/work/mbedtls/include/mbedtls/ecdh.h:347:5: note: by argument 2 of type ‘const mbedtls_ecp_keypair *’ to ‘mbedtls_ecdh_get_params’ declared here
347 | int mbedtls_ecdh_get_params( mbedtls_ecdh_context *ctx,
| ^~~~~~~~~~~~~~~~~~~~~~~
/home/devnaga/work/mbedtls/tests/suites/test_suite_ecdh.function:50:25: note: ‘kp’ declared here
50 | mbedtls_ecp_keypair kp;| ^~
cc1: all warnings being treated as errors
make[2]: *** [tests/CMakeFiles/test_suite_ecdh.dir/build.make:86: tests/CMakeFiles/test_suite_ecdh.dir/test_suite_ecdh.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:3798: tests/CMakeFiles/test_suite_ecdh.dir/all] Error 2
The text was updated successfully, but these errors were encountered:
I think there are multiple dependencies. For now i have used memset. But i think that's something you wouldn't want it in for invalid_param test. So there's a better fix IMO.
Summary
Build error with master at e5833c1
System information
Mbed TLS version (number or commit id): e5833c1
Operating system and version: Fedora 36
Configuration (if not default, please attach
mbedtls_config.h
):Compiler and options (if you used a pre-built binary, please indicate how you obtained it):
Additional environment information:
Expected behavior
The build shall be clean. Looks like the test seem intended but one could set garbage data as initializer to silence the error.
Actual behavior
Steps to reproduce
Additional information
Below is the compiler error:
The text was updated successfully, but these errors were encountered: