style(core): appease clang about _Static_assert
What changed, and why it matters
This is a one-character style fix that adds an empty message string to a compile-time assertion. It has no effect on the device's behavior, security, or stored secrets. It simply keeps the code compatible with stricter compiler settings.
No security action needed. Treat as a normal build/style fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change modifies a _Static_assert in secret_keys_common.c from the C11 two-argument form to the explicit two-argument form with an empty string. Some toolchains/clang configurations require the message argument. The assertion itself (ECDSA_PRIVATE_KEY_SIZE == SHA256_DIGEST_LENGTH) is unchanged, so runtime semantics and key derivation logic are identical.
Changed components
core/embed/sec/secret/secret_keys_common.cInspect captured patch +1 / −1
diff --git a/core/embed/sec/secret/secret_keys_common.c b/core/embed/sec/secret/secret_keys_common.c
index 379985f14..79e4ccde1 100644
--- a/core/embed/sec/secret/secret_keys_common.c
+++ b/core/embed/sec/secret/secret_keys_common.c
@@ -82,7 +82,7 @@ secbool secret_key_derive_nist256p1(uint8_t slot, uint16_t index,
// `slot` argument is not used unless SECRET_PRIVILEGED_MASTER_KEY_SLOT is
// defined
- _Static_assert(ECDSA_PRIVATE_KEY_SIZE == SHA256_DIGEST_LENGTH);
+ _Static_assert(ECDSA_PRIVATE_KEY_SIZE == SHA256_DIGEST_LENGTH, "");
secbool ret = sectrue;
bignum256 s = {0};
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.