Blame SOURCES/mdadm-Forced-type-conversion-to-avoid-truncation.patch

b7f731
From 5b97512954e9710fd45ab5778bf679205c35892d Mon Sep 17 00:00:00 2001
b7f731
From: Xiao Ni <xni@redhat.com>
b7f731
Date: Sat, 18 Mar 2017 10:33:45 +0800
b7f731
Subject: [RHEL7.5 PATCH 016/169] mdadm: Forced type conversion to avoid
b7f731
 truncation
b7f731
b7f731
Gcc reports it needs 19 bytes to right to disk->serial. Because the
b7f731
type of argument i is int. But the meaning of i is failed disk
b7f731
number. So it doesn't need to use 19 bytes.  Just add a type
b7f731
conversion to avoid this building error
b7f731
b7f731
Signed-off-by: Xiao Ni <xni@redhat.com>
b7f731
Signed-off-by: Jes Sorensen <Jes.Sorensen@gmail.com>
b7f731
---
b7f731
 super-intel.c | 2 +-
b7f731
 1 file changed, 1 insertion(+), 1 deletion(-)
b7f731
b7f731
diff --git a/super-intel.c b/super-intel.c
b7f731
index 343f20d..e1618f1 100644
b7f731
--- a/super-intel.c
b7f731
+++ b/super-intel.c
b7f731
@@ -5228,7 +5228,7 @@ static int init_super_imsm_volume(struct supertype *st, mdu_array_info_t *info,
b7f731
 			disk->status = CONFIGURED_DISK | FAILED_DISK;
b7f731
 			disk->scsi_id = __cpu_to_le32(~(__u32)0);
b7f731
 			snprintf((char *) disk->serial, MAX_RAID_SERIAL_LEN,
b7f731
-				 "missing:%d", i);
b7f731
+				 "missing:%d", (__u8)i);
b7f731
 		}
b7f731
 		find_missing(super);
b7f731
 	} else {
b7f731
-- 
b7f731
2.7.4
b7f731