dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

Blame SOURCES/0378-grub-core-disk-ahci.c-Fix-compilation-for-amd64-form.patch

f96e0b
From 5868a0441dd295918687d7751aec3d0435ad3a28 Mon Sep 17 00:00:00 2001
f96e0b
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
f96e0b
Date: Sun, 28 Apr 2013 15:17:43 +0200
f96e0b
Subject: [PATCH 378/482] 	* grub-core/disk/ahci.c: Fix compilation for
f96e0b
 amd64 (format warnings).
f96e0b
f96e0b
---
f96e0b
 ChangeLog             | 4 ++++
f96e0b
 grub-core/disk/ahci.c | 8 ++++----
f96e0b
 2 files changed, 8 insertions(+), 4 deletions(-)
f96e0b
f96e0b
diff --git a/ChangeLog b/ChangeLog
f96e0b
index 727a8c8..8b4206e 100644
f96e0b
--- a/ChangeLog
f96e0b
+++ b/ChangeLog
f96e0b
@@ -1,5 +1,9 @@
f96e0b
 2013-04-28  Vladimir Serbinenko  <phcoder@gmail.com>
f96e0b
 
f96e0b
+	* grub-core/disk/ahci.c: Fix compilation for amd64 (format warnings).
f96e0b
+
f96e0b
+2013-04-28  Vladimir Serbinenko  <phcoder@gmail.com>
f96e0b
+
f96e0b
 	* include/grub/efi/api.h (GRUB_EFI_DEVICE_PATH_LENGTH): Use
f96e0b
 	grub_get_unaligned16 rather than shifts.
f96e0b
 
f96e0b
diff --git a/grub-core/disk/ahci.c b/grub-core/disk/ahci.c
f96e0b
index 47fd423..e617042 100644
f96e0b
--- a/grub-core/disk/ahci.c
f96e0b
+++ b/grub-core/disk/ahci.c
f96e0b
@@ -531,8 +531,8 @@ grub_ahci_pciinit (grub_pci_device_t dev,
f96e0b
 		      adevs[i]->hba->ports[adevs[i]->port].sata_error);
f96e0b
 
f96e0b
 	grub_dprintf ("ahci", "offset: %x, tfd:%x, CMD: %x\n",
f96e0b
-		      (char *) &adevs[i]->hba->ports[adevs[i]->port].task_file_data - 
f96e0b
-		      (char *) adevs[i]->hba,
f96e0b
+		      (int) ((char *) &adevs[i]->hba->ports[adevs[i]->port].task_file_data - 
f96e0b
+			     (char *) adevs[i]->hba),
f96e0b
 		      adevs[i]->hba->ports[adevs[i]->port].task_file_data,
f96e0b
 		      adevs[i]->hba->ports[adevs[i]->port].command);
f96e0b
 
f96e0b
@@ -545,8 +545,8 @@ grub_ahci_pciinit (grub_pci_device_t dev,
f96e0b
     if (adevs[i])
f96e0b
       {
f96e0b
 	grub_dprintf ("ahci", "offset: %x, tfd:%x, CMD: %x\n",
f96e0b
-		      (char *) &adevs[i]->hba->ports[adevs[i]->port].task_file_data - 
f96e0b
-		      (char *) adevs[i]->hba,
f96e0b
+		      (int) ((char *) &adevs[i]->hba->ports[adevs[i]->port].task_file_data - 
f96e0b
+			     (char *) adevs[i]->hba),
f96e0b
 		      adevs[i]->hba->ports[adevs[i]->port].task_file_data,
f96e0b
 		      adevs[i]->hba->ports[adevs[i]->port].command);
f96e0b
 
f96e0b
-- 
f96e0b
1.8.2.1
f96e0b