[syslinux] [PATCH 2/3] efi: fix pointer-type mismatch assigment warning

celelibi at gmail.com celelibi at gmail.com
Tue Aug 25 19:28:13 PDT 2015


From: Sylvain Gault <sylvain.gault at gmail.com>

The assignment looks suspicious but is actually legit since it is
protected by the type check.

Signed-off-by: Sylvain Gault <sylvain.gault at gmail.com>
---
 efi/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/efi/main.c b/efi/main.c
index 8e08d4f..7d9d515 100644
--- a/efi/main.c
+++ b/efi/main.c
@@ -63,7 +63,7 @@ bool efi_get_MAC( EFI_DEVICE_PATH * pDevPath, uint8_t * mac, uint16_t mac_size)
         /* Find the handler to dump this device path node */
 	if (DevicePathType(DevPathNode) == MESSAGING_DEVICE_PATH &&
 		DevicePathSubType(DevPathNode) == MSG_MAC_ADDR_DP) {
-	    MAC = DevPathNode;
+	    MAC = (MAC_ADDR_DEVICE_PATH *)DevPathNode;
 	    CopyMem(mac, MAC->MacAddress.Addr, PXE_MAC_LENGTH);
 	    FreePool(pDevPath);
 	    return TRUE;
-- 
2.5.0



More information about the Syslinux mailing list