build(core): add missing string argument to _Static_assert
What changed, and why it matters
This is a one-line build fix for a software-only emulator path. The C _Static_assert macro requires a message string as its second argument on some compilers/toolchains. The change adds an empty string so the code compiles. It does not alter runtime behavior, secret handling, or any security logic.
No security action required; treat as a normal build-compatibility fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
In core/embed/sec/secret_keys/unix/secret_keys.c, the Unix emulator implementation of secret_key_mcu_device_auth() used _Static_assert with only one argument. The C11 _Static_assert keyword accepts two arguments (expression, message), although some compilers allow the one-argument form as an extension. The patch adds an empty message string (“”) to satisfy strict compilers. The assertion condition and the function body are unchanged.
Changed components
core/embed/sec/secret_keys/unix/secret_keys.cInspect captured patch +1 / −1
diff --git a/core/embed/sec/secret_keys/unix/secret_keys.c b/core/embed/sec/secret_keys/unix/secret_keys.c
index 5061db4f..f0b6e2e7 100644
--- a/core/embed/sec/secret_keys/unix/secret_keys.c
+++ b/core/embed/sec/secret_keys/unix/secret_keys.c
@@ -28,7 +28,7 @@
#ifdef USE_MCU_ATTESTATION
secbool secret_key_mcu_device_auth(uint8_t dest[MLDSA_SEEDBYTES]) {
- _Static_assert(MLDSA_SEEDBYTES == SHA256_DIGEST_LENGTH);
+ _Static_assert(MLDSA_SEEDBYTES == SHA256_DIGEST_LENGTH, "");
memset(dest, 3, SHA256_DIGEST_LENGTH);
return sectrue;
}
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.