[U-Boot] [PATCH v1] Fix a compiler warning in arch/x86/lib/realmode.c

Gabe Black gabeblack at chromium.org
Fri Oct 21 06:29:17 CEST 2011


Ensure that the value being passed to a %d format specifier is of type
int.


Signed-off-by: Gabe Black <gabeblack at chromium.org>
---
 arch/x86/lib/realmode.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/lib/realmode.c b/arch/x86/lib/realmode.c
index c113393..6aa0f23 100644
--- a/arch/x86/lib/realmode.c
+++ b/arch/x86/lib/realmode.c
@@ -41,7 +41,7 @@ int realmode_setup(void)
 	if (realmode_size > (REALMODE_MAILBOX - (char *)REALMODE_BASE)) {
 		printf("realmode switch too large (%ld bytes, max is %d)\n",
 		       realmode_size,
-		       (REALMODE_MAILBOX - (char *)REALMODE_BASE));
+		       (int)(REALMODE_MAILBOX - (char *)REALMODE_BASE));
 		return -1;
 	}
 
-- 
1.7.3.1



More information about the U-Boot mailing list