Hi all,

I wanted to check my understanding here before I submit a patch :-)

According to page 1140 of the UEFI 2.5 spec, EFI_PXE_BASE_CODE_PROTOCOL.Mtftp()'s parameter "Filename" should be of type CHAR8 * (signed char *). However, it's implementation in MdePkg/Include/Protocol/PxeBaseCode.h declares Filename as a UINT8 * (unsigned char *). This causes a "differ in signedness" compilation error for me when passing a string directly in the Filename parameter, e.g.:

            Status = PxeBcProtocol->Mtftp(
                PxeBcProtocol,
                EFI_PXE_BASE_CODE_MTFTP_GET_FILE_SIZE,
                &Buffer,
                FALSE,
                sizeof(Buffer),
                NULL,
                &TftpIpAddr,
                "HelloWorld.efi",  // <-- Filename
                NULL,
                TRUE
            );

Should the data type be changed in PxeBaseCode.h, or should the caller cast the pointer?

--
Thanks,
David

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to