arrfab / rpms / shim

Forked from rpms/shim 4 years ago
Clone
Blob Blame History Raw
From 8bd4477e3a28a6c7a32f2c1e338ed3ec8394f2e4 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Wed, 25 Feb 2015 18:03:37 +0000
Subject: [PATCH 1/2] fallback: Fix comparison between signed and unsigned in
 debugging code.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

fallback.c: In function ‘update_boot_order’:
fallback.c:334:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
  for (j = 0 ; j < size / sizeof (CHAR16); j++)
                   ^
fallback.c: In function ‘add_to_boot_list’:
fallback.c:402:16: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
  for (i = 0; i < s; i++) {
                  ^

Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
---
 fallback.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fallback.c b/fallback.c
index d10fb62..e739b78 100644
--- a/fallback.c
+++ b/fallback.c
@@ -328,7 +328,7 @@ update_boot_order(void)
 
 #ifdef DEBUG_FALLBACK
 	Print(L"nbootorder: %d\nBootOrder: ", size / sizeof (CHAR16));
-	int j;
+	UINTN j;
 	for (j = 0 ; j < size / sizeof (CHAR16); j++)
 		Print(L"%04x ", newbootorder[j]);
 	Print(L"\n");
@@ -395,7 +395,7 @@ add_to_boot_list(EFI_FILE_HANDLE fh, CHAR16 *dirname, CHAR16 *filename, CHAR16 *
 #ifdef DEBUG_FALLBACK
 	{
 	UINTN s = DevicePathSize(dp);
-	int i;
+	UINTN i;
 	UINT8 *dpv = (void *)dp;
 	for (i = 0; i < s; i++) {
 		if (i > 0 && i % 16 == 0)
-- 
2.1.0