uimage_sgehdr: use "char" type for header struct strings
authorRafał Miłecki <rafal@milecki.pl>
Fri, 23 Feb 2024 06:18:37 +0000 (07:18 +0100)
committerRafał Miłecki <rafal@milecki.pl>
Tue, 26 Mar 2024 09:16:30 +0000 (10:16 +0100)
This fixes:

src/uimage_sgehdr.c: In function ‘main’:
src/uimage_sgehdr.c:152:10: warning: pointer targets in passing argument 1 of ‘strncpy’ differ in signedness [-Wpointer-sign]
  strncpy(imgh->sgeih_p, model, sizeof(imgh->sgeih_p));
          ^~~~
src/uimage_sgehdr.c:153:10: warning: pointer targets in passing argument 1 of ‘strncpy’ differ in signedness [-Wpointer-sign]
  strncpy(imgh->sgeih_sv, sversion, sizeof(imgh->sgeih_sv));
          ^~~~
src/uimage_sgehdr.c:154:10: warning: pointer targets in passing argument 1 of ‘strncpy’ differ in signedness [-Wpointer-sign]
  strncpy(imgh->sgeih_hv, hversion, sizeof(imgh->sgeih_hv));
          ^~~~

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
src/uimage_sgehdr.c

index 28143a8b22f883f5749d0148fd9b21f50b344462..6d62c048ec75ee9c7816578fabbd2b416d17cc4f 100644 (file)
@@ -40,9 +40,9 @@ struct image_header {
        uint8_t         ih_type;        /* Image Type                   */
        uint8_t         ih_comp;        /* Compression Type             */
        uint8_t         ih_name[IH_NMLEN];      /* Image Name           */
-       uint8_t         sgeih_p[SGE_PRODUCTLEN];        /* sge_Product          */
-       uint8_t         sgeih_sv[SGE_VERSIONLEN];       /* sge Software Version         */
-       uint8_t         sgeih_hv[SGE_VERSIONLEN];       /* sge Hardware Version         */
+       char            sgeih_p[SGE_PRODUCTLEN];        /* sge_Product          */
+       char            sgeih_sv[SGE_VERSIONLEN];       /* sge Software Version         */
+       char            sgeih_hv[SGE_VERSIONLEN];       /* sge Hardware Version         */
 };