From a4610f9cfef179f2013156da9768039f52519f04 Mon Sep 17 00:00:00 2001 From: Sunil Dora Date: Sun, 30 Aug 2026 11:09:51 +0530 Subject: CryptoPkg: Fix memcpy alias prototype to match the aliasee The memcpy alias in IntrinsicLib declares its count parameter as unsigned int while the aliasee __memcpy uses size_t. On 64-bit targets these are different widths. clang 23 diagnoses this through -Wattribute-alias: CopyMem.c:29:17: warning: alias and aliasee have different types 'void *(void *, const void *, unsigned int)' and 'void *(void *, const void *, size_t)' [-Wattribute-alias] and builds that treat warnings as errors fail, e.g. OVMF built with the CLANGDWARF toolchain in Yocto. Declare the alias with size_t so both signatures agree. Signed-off-by: Sunil Dora --- CryptoPkg/Library/IntrinsicLib/CopyMem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CryptoPkg/Library/IntrinsicLib/CopyMem.c b/CryptoPkg/Library/IntrinsicLib/CopyMem.c index 5e346728c5..fec0fb6db8 100644 --- a/CryptoPkg/Library/IntrinsicLib/CopyMem.c +++ b/CryptoPkg/Library/IntrinsicLib/CopyMem.c @@ -29,9 +29,9 @@ __memcpy ( __attribute__ ((__alias__ ("__memcpy"))) void * memcpy ( - void *dest, - const void *src, - unsigned int count + void *dest, + const void *src, + size_t count ); #else -- cgit v1.2.3