[syslinux:firmware] efi: cast third argument to HandleProtocol()
syslinux-bot for Matt Fleming
matt.fleming at intel.com
Thu Jun 20 06:51:24 PDT 2013
Commit-ID: 82f93c9337b23a81a6b270fede0e89b0fc8e2e59
Gitweb: http://www.syslinux.org/commit/82f93c9337b23a81a6b270fede0e89b0fc8e2e59
Author: Matt Fleming <matt.fleming at intel.com>
AuthorDate: Wed, 19 Jun 2013 16:58:46 +0100
Committer: Matt Fleming <matt.fleming at intel.com>
CommitDate: Wed, 19 Jun 2013 17:11:29 +0100
efi: cast third argument to HandleProtocol()
and fix a bunch of compiler warnings along the lines of,
efi/console.c:86:3: warning: passing argument 3 of ‘BS->HandleProtocol’ from incompatible pointer type [enabled by default]
efi/console.c:86:3: note: expected ‘void **’ but argument is of type ‘struct EFI_GRAPHICS_OUTPUT_PROTOCOL **’
Signed-off-by: Matt Fleming <matt.fleming at intel.com>
---
efi/console.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/efi/console.c b/efi/console.c
index 3da1789..cc49388 100644
--- a/efi/console.c
+++ b/efi/console.c
@@ -83,10 +83,12 @@ static int setup_gop(struct screen_info *si)
EFI_PCI_IO *pciio = NULL;
EFI_HANDLE *h = handles[i];
- status = uefi_call_wrapper(BS->HandleProtocol, 3, h, &GraphicsOutputProtocol, &gop);
+ status = uefi_call_wrapper(BS->HandleProtocol, 3, h,
+ &GraphicsOutputProtocol, (void **)&gop);
if (status != EFI_SUCCESS)
continue;
- uefi_call_wrapper(BS->HandleProtocol, 3, h, &PciIoProtocol, &pciio);
+ uefi_call_wrapper(BS->HandleProtocol, 3, h,
+ &PciIoProtocol, (void **)&pciio);
status = gop_query_mode(gop, &size, &info);
if (status == EFI_SUCCESS && (!found || pciio)) {
lfb_width = info->HorizontalResolution;
@@ -227,12 +229,12 @@ static int setup_uga(struct screen_info *si)
UINT32 w, h, depth, refresh;
status = uefi_call_wrapper(BS->HandleProtocol, 3, handle,
- &UgaProtocol, &uga);
+ &UgaProtocol, (void **)&uga);
if (status != EFI_SUCCESS)
continue;
uefi_call_wrapper(BS->HandleProtocol, 3, handle,
- &PciIoProtocol, &pciio);
+ &PciIoProtocol, (void **)&pciio);
status = uefi_call_wrapper(uga->GetMode, 5, uga, &w, &h,
&depth, &refresh);
More information about the Syslinux-commits
mailing list