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

compilation warning #7

Open
atsju opened this issue Jun 11, 2024 · 0 comments
Open

compilation warning #7

atsju opened this issue Jun 11, 2024 · 0 comments

Comments

@atsju
Copy link

atsju commented Jun 11, 2024

Using GCC 13.2.1 I get 2 compilation warnings in this file. Please Fix

block_t mac_recomputed = block_t_convert(mac_buf, mac->len);

[build] C:/.../simplicity_sdk/util/third_party/crypto_ip/libcryptosoc/src/sx_blk_cipher.c: In function 'sx_blk_cipher_ccm_decrypt_verify':
[build] C:/.../simplicity_sdk/util/third_party/crypto_ip/libcryptosoc/src/sx_blk_cipher.c:757:29: warning: 'mac_buf' may be used uninitialized [-Wmaybe-uninitialized]
[build]   757 |    block_t mac_recomputed = block_t_convert(mac_buf, mac->len);
[build]       |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[build] In file included from C:/.../simplicity_sdk/util/third_party/crypto_ip/libcryptosoc/include/sx_aes.h:13,
[build]                  from C:/.../simplicity_sdk/util/third_party/crypto_ip/libcryptosoc/src/sx_blk_cipher.c:11:
[build] C:/.../simplicity_sdk/util/third_party/crypto_ip/libcryptosoc/include/cryptolib_types.h:76:23: note: by argument 1 of type 'const volatile void *' to 'block_t_convert' declared here
[build]    76 | static inline block_t block_t_convert(const volatile void *array, uint32_t length)
[build]       |                       ^~~~~~~~~~~~~~~
[build] C:/.../simplicity_sdk/util/third_party/crypto_ip/libcryptosoc/src/sx_blk_cipher.c:756:12: note: 'mac_buf' declared here
[build]   756 |    uint8_t mac_buf[BLK_CIPHER_MAC_SIZE];
[build]       |            ^~~~~~~
[build] C:/.../simplicity_sdk/util/third_party/crypto_ip/libcryptosoc/src/sx_blk_cipher.c: In function 'sx_blk_cipher_ccm_decrypt_verify_final':
[build] C:/.../simplicity_sdk/util/third_party/crypto_ip/libcryptosoc/src/sx_blk_cipher.c:949:29: warning: 'mac_buf' may be used uninitialized [-Wmaybe-uninitialized]
[build]   949 |    block_t mac_recomputed = block_t_convert(mac_buf, mac->len);
[build]       |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[build] C:/.../simplicity_sdk/util/third_party/crypto_ip/libcryptosoc/include/cryptolib_types.h:76:23: note: by argument 1 of type 'const volatile void *' to 'block_t_convert' declared here
[build]    76 | static inline block_t block_t_convert(const volatile void *array, uint32_t length)
[build]       |                       ^~~~~~~~~~~~~~~
[build] C:/.../simplicity_sdk/util/third_party/crypto_ip/libcryptosoc/src/sx_blk_cipher.c:948:12: note: 'mac_buf' declared here
[build]   948 |    uint8_t mac_buf[BLK_CIPHER_MAC_SIZE];
[build]       |            ^~~~~~~
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

No branches or pull requests

1 participant