Skip to contentSkip to conversation

Fix some building errors

PATCH Applied Xiao Ni 2 participants 2 messages Apr 23, 2021 – May 6, 2021 MD RAID

lore
Share & tools
lore

Xiao Ni

author
#0 lore raw

PATCH 1/1 Fix some building errors

There are some building errors if treating warning as errors. Fix them in this patch.

---
 super-intel.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
super-intel.c +3 -3
index 876e077..08bf2a3 100644
@@ -3192,7 +3192,7 @@ static int imsm_create_metadata_checkpoint_update(
 	}
 	(*u)->type = update_general_migration_checkpoint;
 	(*u)->curr_migr_unit = current_migr_unit(super->migr_rec);
-	dprintf("prepared for %llu\n", (*u)->curr_migr_unit);
+	dprintf("prepared for %llu\n", (unsigned long long)(*u)->curr_migr_unit);
 
 	return update_memory_size;
 }
@@ -11127,7 +11127,7 @@ int recover_backup_imsm(struct supertype *st, struct mdinfo *info)
 			skipped_disks++;
 			continue;
 		}
-		if (read(dl_disk->fd, buf, unit_len) != unit_len) {
+		if (read(dl_disk->fd, buf, unit_len) != (ssize_t)unit_len) {
 			pr_err("Cannot read copy area block: %s\n",
 			       strerror(errno));
 			skipped_disks++;
@@ -11139,7 +11139,7 @@ int recover_backup_imsm(struct supertype *st, struct mdinfo *info)
 			skipped_disks++;
 			continue;
 		}
-		if (write(dl_disk->fd, buf, unit_len) != unit_len) {
+		if (write(dl_disk->fd, buf, unit_len) != (ssize_t)unit_len) {
 			pr_err("Cannot restore block: %s\n",
 			       strerror(errno));
 			skipped_disks++;
Signature · 1 line
2.7.5
Applied
#1 lore raw
Quoted 7 lines · Xiao Ni

There are some building errors if treating warning as errors. Fix them in this patch.

---
 super-intel.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Applied!

Thanks,
Jes