Message ID | 20181115023353.20159-6-ard.biesheuvel@linaro.org |
---|---|
State | New |
Headers | show |
Series | IntelUndiPkg/XGigUndiDxe: fix GCC / ARM build issues | expand |
Reviewed-by: Ryszard Knop <ryszard.knop@linux.intel.com> On Wed, 2018-11-14 at 18:33 -0800, ard.biesheuvela wrote: > Unlike Visual Studio, GCC does not permit implicit conversion between > a pointer-to-void-pointer and pointer to a typed pointer. So add the > explicit casts where necessary. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Ard Biesheuvel <ard.biesheuvel at linaro.org> > --- > IntelUndiPkg/XGigUndiDxe/Hii.c | 8 ++++---- > IntelUndiPkg/XGigUndiDxe/Init.c | 2 +- > 2 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/IntelUndiPkg/XGigUndiDxe/Hii.c > b/IntelUndiPkg/XGigUndiDxe/Hii.c > index 857a475622f7..3ad7d61e493d 100644 > --- a/IntelUndiPkg/XGigUndiDxe/Hii.c > +++ b/IntelUndiPkg/XGigUndiDxe/Hii.c > @@ -459,7 +459,7 @@ HiiOpenProtocol ( > Status = gBS->LocateProtocol ( > &gEfiHiiDatabaseProtocolGuid, > NULL, > - &UndiPrivateData->HiiDatabase > + (VOID **)&UndiPrivateData->HiiDatabase > ); > if (EFI_ERROR (Status)) { > DEBUGPRINT (CRITICAL, ("Error finding HII protocol: %r\n", > Status)); > @@ -472,7 +472,7 @@ HiiOpenProtocol ( > Status = gBS->LocateProtocol ( > &gEfiHiiStringProtocolGuid, > NULL, > - &UndiPrivateData->HiiString > + (VOID **)&UndiPrivateData->HiiString > ); > if (EFI_ERROR (Status)) { > DEBUGPRINT (CRITICAL, ("Error finding HII String protocol: > %r\n", Status)); > @@ -485,7 +485,7 @@ HiiOpenProtocol ( > Status = gBS->LocateProtocol ( > &gEfiFormBrowser2ProtocolGuid, > NULL, > - &UndiPrivateData->FormBrowser2 > + (VOID **)&UndiPrivateData->FormBrowser2 > ); > if (EFI_ERROR (Status)) { > DEBUGPRINT (CRITICAL, ("Error finding HII form browser protocol: > %r\n", Status)); > @@ -498,7 +498,7 @@ HiiOpenProtocol ( > Status = gBS->LocateProtocol ( > &gEfiHiiConfigRoutingProtocolGuid, > NULL, > - &UndiPrivateData->HiiConfigRouting > + (VOID **)&UndiPrivateData->HiiConfigRouting > ); > if (EFI_ERROR (Status)) { > DEBUGPRINT (CRITICAL, ("Error finding HII ConfigRouting > protocol: %r\n", Status)); > diff --git a/IntelUndiPkg/XGigUndiDxe/Init.c > b/IntelUndiPkg/XGigUndiDxe/Init.c > index bffe3c165866..84e06ea071c5 100644 > --- a/IntelUndiPkg/XGigUndiDxe/Init.c > +++ b/IntelUndiPkg/XGigUndiDxe/Init.c > @@ -179,7 +179,7 @@ InitAppendMac2DevPath ( > Status = gBS->AllocatePool ( > EfiBootServicesData, // EfiRuntimeServicesData, > TotalPathLen, > - &DevicePtr > + (VOID **)&DevicePtr > ); > > if (Status != EFI_SUCCESS) { _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
diff --git a/IntelUndiPkg/XGigUndiDxe/Hii.c b/IntelUndiPkg/XGigUndiDxe/Hii.c index 857a475622f7..3ad7d61e493d 100644 --- a/IntelUndiPkg/XGigUndiDxe/Hii.c +++ b/IntelUndiPkg/XGigUndiDxe/Hii.c @@ -459,7 +459,7 @@ HiiOpenProtocol ( Status = gBS->LocateProtocol ( &gEfiHiiDatabaseProtocolGuid, NULL, - &UndiPrivateData->HiiDatabase + (VOID **)&UndiPrivateData->HiiDatabase ); if (EFI_ERROR (Status)) { DEBUGPRINT (CRITICAL, ("Error finding HII protocol: %r\n", Status)); @@ -472,7 +472,7 @@ HiiOpenProtocol ( Status = gBS->LocateProtocol ( &gEfiHiiStringProtocolGuid, NULL, - &UndiPrivateData->HiiString + (VOID **)&UndiPrivateData->HiiString ); if (EFI_ERROR (Status)) { DEBUGPRINT (CRITICAL, ("Error finding HII String protocol: %r\n", Status)); @@ -485,7 +485,7 @@ HiiOpenProtocol ( Status = gBS->LocateProtocol ( &gEfiFormBrowser2ProtocolGuid, NULL, - &UndiPrivateData->FormBrowser2 + (VOID **)&UndiPrivateData->FormBrowser2 ); if (EFI_ERROR (Status)) { DEBUGPRINT (CRITICAL, ("Error finding HII form browser protocol: %r\n", Status)); @@ -498,7 +498,7 @@ HiiOpenProtocol ( Status = gBS->LocateProtocol ( &gEfiHiiConfigRoutingProtocolGuid, NULL, - &UndiPrivateData->HiiConfigRouting + (VOID **)&UndiPrivateData->HiiConfigRouting ); if (EFI_ERROR (Status)) { DEBUGPRINT (CRITICAL, ("Error finding HII ConfigRouting protocol: %r\n", Status)); diff --git a/IntelUndiPkg/XGigUndiDxe/Init.c b/IntelUndiPkg/XGigUndiDxe/Init.c index bffe3c165866..84e06ea071c5 100644 --- a/IntelUndiPkg/XGigUndiDxe/Init.c +++ b/IntelUndiPkg/XGigUndiDxe/Init.c @@ -179,7 +179,7 @@ InitAppendMac2DevPath ( Status = gBS->AllocatePool ( EfiBootServicesData, // EfiRuntimeServicesData, TotalPathLen, - &DevicePtr + (VOID **)&DevicePtr ); if (Status != EFI_SUCCESS) {
Unlike Visual Studio, GCC does not permit implicit conversion between a pointer-to-void-pointer and pointer to a typed pointer. So add the explicit casts where necessary. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> --- IntelUndiPkg/XGigUndiDxe/Hii.c | 8 ++++---- IntelUndiPkg/XGigUndiDxe/Init.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) -- 2.17.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel