summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorSteve Langasek <steve.langasek@canonical.com>2013-09-20 18:03:50 +0000
committerSteve Langasek <steve.langasek@canonical.com>2013-09-20 18:03:50 +0000
commitc43e3c7c0ec34b02fbf91d85dfdf0982fc8aacdc (patch)
tree8bbd2bd357cd7b0774b343fc89a96da1cbf065e5 /debian
parent990ce02ddd9bb05ba2a375a56e5b66043cc002cd (diff)
downloadefi-boot-shim-c43e3c7c0ec34b02fbf91d85dfdf0982fc8aacdc.tar.gz
efi-boot-shim-c43e3c7c0ec34b02fbf91d85dfdf0982fc8aacdc.zip
Fix remaining compiler warnings in netboot.c.
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog5
-rw-r--r--debian/patches/fix-compiler-warnings49
-rw-r--r--debian/patches/series1
3 files changed, 54 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 8de51d79..d1e4c465 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,7 +2,10 @@ shim (0.4-0ubuntu4) UNRELEASED; urgency=low
* debian/patches/fix-tftp-prototype: pass the right arguments to
EFI_PXE_BASE_CODE_TFTP_READ_FILE.
- * Build with -Werror to catch future prototype mismatches.
+ * debian/patches/build-with-Werror: Build with -Werror to catch future
+ prototype mismatches.
+ * debian/patches/fix-compiler-warnings: Fix remaining compiler
+ warnings in netboot.c.
-- Steve Langasek <steve.langasek@ubuntu.com> Fri, 20 Sep 2013 14:43:23 +0000
diff --git a/debian/patches/fix-compiler-warnings b/debian/patches/fix-compiler-warnings
new file mode 100644
index 00000000..b90c9f2a
--- /dev/null
+++ b/debian/patches/fix-compiler-warnings
@@ -0,0 +1,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
diff --git a/debian/patches/series b/debian/patches/series
index 8717a913..ced10f02 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@ no-output-by-default.patch
no-print-on-unsigned
fix-tftp-prototype
build-with-Werror
+fix-compiler-warnings