Blame SOURCES/0014-Fix-a-sign-error-in-the-debughook-example-app.patch

d1fe48
From 25cebcee2ae0b92829841321220ec9837479c118 Mon Sep 17 00:00:00 2001
d1fe48
From: Peter Jones <pjones@redhat.com>
d1fe48
Date: Tue, 13 Mar 2018 15:20:24 -0400
d1fe48
Subject: [PATCH 14/25] Fix a sign error in the debughook example app
d1fe48
d1fe48
On ISO C90 on i386 4294967294 is a signed integer, and so x can't be
d1fe48
greater (or equal) to that.  Make it an unsigned and choose a better type
d1fe48
for the variable.
d1fe48
d1fe48
Signed-off-by: Peter Jones <pjones@redhat.com>
d1fe48
Signed-off-by: Nigel Croxon <ncroxon@redhat.com>
d1fe48
---
d1fe48
 apps/debughook.c | 4 ++--
d1fe48
 1 file changed, 2 insertions(+), 2 deletions(-)
d1fe48
d1fe48
diff --git a/apps/debughook.c b/apps/debughook.c
d1fe48
index 93cd0cf7eb0..78e4a767b1d 100644
d1fe48
--- a/apps/debughook.c
d1fe48
+++ b/apps/debughook.c
d1fe48
@@ -50,7 +50,7 @@ DebugHook(void)
d1fe48
 	UINT8 *data = NULL;
d1fe48
 	UINTN dataSize = 0;
d1fe48
 	EFI_STATUS efi_status;
d1fe48
-	register volatile UINTN x = 0;
d1fe48
+	register volatile unsigned long long x = 0;
d1fe48
 	extern char _text, _data;
d1fe48
 
d1fe48
 	if (x)
d1fe48
@@ -71,7 +71,7 @@ DebugHook(void)
d1fe48
 	while (x++) {
d1fe48
 		/* Make this so it can't /totally/ DoS us. */
d1fe48
 #if defined(__x86_64__) || defined(__i386__) || defined(__i686__)
d1fe48
-		if (x > 4294967294)
d1fe48
+		if (x > 4294967294ULL)
d1fe48
 			break;
d1fe48
 		__asm__ __volatile__("pause");
d1fe48
 #elif defined(__aarch64__)
d1fe48
-- 
d1fe48
2.15.0
d1fe48