fix: Drop misleading `const` on TLV-populated descriptor fields
safe_descriptor_t::address and four gating_t fields (hash_selector, intro_msg, tiny_url, address) were declared `const` to document that they should not change after parsing, but the TLV handlers wrote into them through `(uint8_t *)` / `(char *)` casts that strip the qualifier. The underlying storage comes from APP_MEM_CALLOC() so this is not strict undefined behaviour, but it is a pattern several static analyzers flag and it weakens the type signal at every read site. Remove the `const` from the five fields and drop the corresponding casts at the parser call sites where they were stripping the qualifier. The two remaining `(uint8_t *)` casts on `char` fields stay since they still perform a char->uint8_t conversion required by the TLV helper signatures. (cherry picked from commit 5a4f7f24b540ee7b84203cf8e2481a5d9b685f0a)
C
Charles-Edouard de la Vergne committed
be257cf69f75c9e1a03d1980c89a79392985723b
Parent: 4a5417a
Committed by Alexandre Paillier <alexandre.paillier@ledger.fr>
on 8/25/2026, 3:03:59 PM