fix(core): get rid of old-style-declaration warnings
What changed, and why it matters
This commit only reorders two C keywords in three places, changing 'const static' to 'static const'. This is a coding-style cleanup to silence compiler warnings and has no effect on what the code actually does or on security.
No security action needed. This is a benign style-only cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch modifies three C source files to use the conventional ‘static const’ qualifier order instead of ‘const static’. In C, both orders are legal but ‘static const’ is the preferred style and some compilers warn about the older form. The generated code is identical because the storage class (static) and qualifier (const) semantics are unchanged. No logic, memory layout, or behavior changes.
Changed components
core/embed/io/touch/ft3168/ft3168.ccore/embed/io/touch/ft6x36/ft6x36.ccore/embed/sys/mpu/stm32u5/mpu.cInspect captured patch +3 / −3
diff --git a/core/embed/io/touch/ft3168/ft3168.c b/core/embed/io/touch/ft3168/ft3168.c
index 115b4403..0d3d12bc 100644
--- a/core/embed/io/touch/ft3168/ft3168.c
+++ b/core/embed/io/touch/ft3168/ft3168.c
@@ -300,7 +300,7 @@ static bool ft3168_test_and_clear_interrupt(void) {
// Configures the touch controller to the functional state.
static secbool ft3168_configure(i2c_bus_t* i2c_bus) {
- const static uint8_t config[] = {
+ static const uint8_t config[] = {
// Set touch controller to the interrupt trigger mode.
// Basically, CTPM generates a pulse when new data is available.
FT3168_REG_G_MODE,
diff --git a/core/embed/io/touch/ft6x36/ft6x36.c b/core/embed/io/touch/ft6x36/ft6x36.c
index ee14db22..b5e530c5 100644
--- a/core/embed/io/touch/ft6x36/ft6x36.c
+++ b/core/embed/io/touch/ft6x36/ft6x36.c
@@ -228,7 +228,7 @@ static bool ft6x36_test_and_clear_interrupt(void) {
// Configures the touch controller to the functional state.
static secbool ft6x36_configure(i2c_bus_t* i2c_bus) {
- const static uint8_t config[] = {
+ static const uint8_t config[] = {
// Set touch controller to the interrupt trigger mode.
// Basically, CTPM generates a pulse when new data is available.
FT6X36_REG_G_MODE,
diff --git a/core/embed/sys/mpu/stm32u5/mpu.c b/core/embed/sys/mpu/stm32u5/mpu.c
index def4a911..6a0a80fe 100644
--- a/core/embed/sys/mpu/stm32u5/mpu.c
+++ b/core/embed/sys/mpu/stm32u5/mpu.c
@@ -40,7 +40,7 @@
#define MPUX_TYPE_FLASH_DATA 3
#define MPUX_TYPE_SRAM_CODE 4
-const static struct {
+static const struct {
uint32_t xn; // executable
uint32_t attr; // attribute index
uint32_t sh; // shareable
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.