summaryrefslogtreecommitdiff
path: root/debian/patches/fix-compiler-warnings
blob: b90c9f2abfcc5f73638322515dc60038dce9dcab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
Description: Fix remaining compiler warnings in netboot.c
 Fix remaining compiler warnings in netboot.c, so that the source builds
 cleanly under -Wall -Werror.
Author: Steve Langasek <steve.langasek@ubuntu.com>

=== modified file 'netboot.c'
Index: shim/netboot.c
===================================================================
--- shim.orig/netboot.c
+++ shim/netboot.c
@@ -53,7 +53,7 @@
 
 static EFI_PXE_BASE_CODE *pxe;
 static EFI_IP_ADDRESS tftp_addr;
-static char *full_path;
+static UINT8 *full_path;
 
 
 typedef struct {
@@ -111,7 +111,7 @@
 	for (i=0; i < (bs / sizeof(EFI_HANDLE)); i++) {
 		status = uefi_call_wrapper(BS->OpenProtocol, 6, hbuf[i],
 					   &pxe_base_code_protocol,
-					   &pxe, image_handle, NULL,
+					   (void **)&pxe, image_handle, NULL,
 					   EFI_OPEN_PROTOCOL_GET_PROTOCOL);
 
 		if (status != EFI_SUCCESS) {
@@ -261,9 +261,9 @@
 		return FALSE;
 	memset(full_path, 0, strlen((UINT8 *)end)+strlen((UINT8 *)template));
 	memcpy(full_path, end, strlen((UINT8 *)end));
-	end = strrchr(full_path, '/');
+	end = strrchr((char *)full_path, '/');
 	if (!end)
-		end = full_path;
+		end = (char *)full_path;
 	memcpy(end, template, strlen((UINT8 *)template));
 
 	return TRUE;
@@ -297,7 +297,7 @@
 
 	memcpy(tmp, template, 12);
 	tmp[13] = '\0';
-	full_path = tmp;
+	full_path = (UINT8 *)tmp;
 
 	/* Note we don't capture the filename option here because we know its shim.efi
 	 * We instead assume the filename at the end of the path is going to be grubx64.efi