mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-10-24 17:57:09 +00:00
The previous prototype gave warnings are the strings produced by #cond and
__FILE__ are const, so we shouldn't implicitly cast them to non-const.
While at it modifying most example programs:
- include the header that has the function declaration, so that the definition
can be checked to match by the compiler
- fix whitespace
- make it work even if PLATFORM_C is not defined:
- CHECK_PARAMS is not documented as depending on PLATFORM_C and there is
no reason why it should
- so, remove the corresponding #if defined in each program...
- and add missing #defines for mbedtls_exit when needed
The result has been tested (make all test with -Werror) with the following
configurations:
- full with CHECK_PARAMS with PLATFORM_C
- full with CHECK_PARAMS without PLATFORM_C
- full without CHECK_PARAMS without PLATFORM_C
- full without CHECK_PARAMS with PLATFORM_C
Additionally, it has been manually tested that adding
mbedtls_aes_init( NULL );
near the normal call to mbedtls_aes_init() in programs/aes/aescrypt2.c has the
expected effect when running the program.
|
||
|---|---|---|
| .. | ||
| CMakeLists.txt | ||
| dh_client.c | ||
| dh_genprime.c | ||
| dh_prime.txt | ||
| dh_server.c | ||
| ecdh_curve25519.c | ||
| ecdsa.c | ||
| gen_key.c | ||
| key_app.c | ||
| key_app_writer.c | ||
| mpi_demo.c | ||
| pk_decrypt.c | ||
| pk_encrypt.c | ||
| pk_sign.c | ||
| pk_verify.c | ||
| rsa_decrypt.c | ||
| rsa_encrypt.c | ||
| rsa_genkey.c | ||
| rsa_priv.txt | ||
| rsa_pub.txt | ||
| rsa_sign.c | ||
| rsa_sign_pss.c | ||
| rsa_verify.c | ||
| rsa_verify_pss.c | ||