[PATCH 3/3] mdadm: add attribute nonstring for signature

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It reports building error in f42:
error: initializer-string for array of ‘unsigned char’ truncates NULL
terminator but destination lacks ‘nonstring’ attribute (5 chars into 4
available) [-Werror=unterminated-string-initialization]

Signed-off-by: Xiao Ni <xni@xxxxxxxxxx>
---
 platform-intel.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/platform-intel.h b/platform-intel.h
index 63d416826118..f92a9a11c3a0 100644
--- a/platform-intel.h
+++ b/platform-intel.h
@@ -24,7 +24,7 @@
 
 /* The IMSM Capability (IMSM AHCI and ISCU OROM/EFI variable) Version Table definition */
 struct imsm_orom {
-	__u8 signature[4];
+	__u8 signature[4] __attribute__((nonstring));
 	#define IMSM_OROM_SIGNATURE "$VER"
 	#define IMSM_NVME_OROM_COMPAT_SIGNATURE "$NVM"
 	#define IMSM_VMD_OROM_COMPAT_SIGNATURE "$VMD"
-- 
2.32.0 (Apple Git-132)





[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux