Skip to contentSkip to conversation

Fix a compiler warning in arch/x86/lib/realmode.c

PATCH New Gabe Black 2 participants 2 messages Oct 21, 2011 – Nov 2, 2011 x86

lore
Share & tools
lore

Gabe Black

author
#0 lore raw

PATCH 1/1 Fix a compiler warning in arch/x86/lib/realmode.c

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

---
 arch/x86/lib/realmode.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/lib/realmode.c +1 -1
index c113393..6aa0f23 100644
@@ -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;
 	}
 
Signature · 1 line
1.7.3.1
#1 lore raw

PATCH 1/1 Fix a compiler warning in arch/x86/lib/realmode.c

Quoted 9 lines · Gabe Black

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

---
 arch/x86/lib/realmode.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Applied to u-boot-x86 (with minor tweak to subject to include x86: label)

Thanks,

Graeme