mks5lboot: Mark uint8_t[] struct members that are initialized from a character array as not containing a null terminator

rockbox-gerrit-noreply--- via rockbox-cvs <[email protected]> Wed, 1 Jul 2026 21:03:50 -0400
Newsgroups gmane.comp.systems.archos.rockbox.cvs
Message-ID <[email protected]>
commit 1ded71b75170890371de12215360d64332659439
Author: Vencislav Atanasov <[email protected]>
Date:   Mon Jun 29 21:45:06 2026 +0300

    mks5lboot: Mark uint8_t[] struct members that are initialized from a character array as not containing a null terminator
    
    Co-authored-by: ChatGPT (GPT-5.3 Mini) <[email protected]>
    Change-Id: I77c3d4b907b175447fef522378d6e61d65f4d2cf

diff --git a/utils/mks5lboot/mks5lboot.h b/utils/mks5lboot/mks5lboot.h
index 45e482c85e..d0185eefa9 100644
--- a/utils/mks5lboot/mks5lboot.h
+++ b/utils/mks5lboot/mks5lboot.h
@@ -47,8 +47,8 @@ extern "C" {
 
 struct Im3Info
 {
-    uint8_t ident[4];
-    uint8_t version[3];
+    uint8_t ident[4] __attribute__((nonstring));
+    uint8_t version[3] __attribute__((nonstring));
     uint8_t enc_type;
     uint8_t entry[4];   /* LE */
     uint8_t data_sz[4]; /* LE */
@@ -58,13 +58,13 @@ struct Im3Info
             uint8_t _reserved[32];
         } enc12;
         struct {
-            uint8_t sign_off[4]; /* LE */
-            uint8_t cert_off[4]; /* LE */
-            uint8_t cert_sz[4];  /* LE */
+            uint8_t sign_off[4] __attribute__((nonstring)); /* LE */
+            uint8_t cert_off[4] __attribute__((nonstring)); /* LE */
+            uint8_t cert_sz[4] __attribute__((nonstring));  /* LE */
             uint8_t _reserved[36];
         } enc34;
     } u;
-    uint8_t info_sign[SIGN_SZ];
+    uint8_t info_sign[SIGN_SZ] __attribute__((nonstring));
 } __attribute__ ((packed));
 
 struct Im3Hdr
-- 
rockbox-cvs mailing list
[email protected]
https://lists.haxx.se/mailman/listinfo/rockbox-cvs