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

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