17/05/2021 11:07, Feifei Wang:
> In Arm platform, when "RTE_ARCH_ARM64_MEMCPY" is set as true, compiler
> will report variable uninitilized warning:
>
> ../drivers/crypto/qat/qat_sym_session.c:
> In function ‘partial_hash_compute’:
> ../lib/eal/include/generic/rte_byteorder.h:241:24: warning:
> ‘<U35a0>’ may be used uninitialized in this function
> [-Wmaybe-uninitialized]
> 241 | #define rte_bswap32(x) __builtin_bswap32(x)
> ...
>
> This is because "digest" will be initialized by "rte_memcpy" function
> rather than "memcpy" if "RTE_ARCH_ARM64_MEMCPY" is set as true. However,
> compiler cannot know it is initialized by the function.
>
> To fix this, use "calloc" to initialize "digest".
>
> Fixes: cd7fc8a84b48 ("eal/arm64: optimize memcpy")
> Cc: [email protected]
>
> Signed-off-by: Feifei Wang <[email protected]>
> Reviewed-by: Ruifeng Wang <[email protected]>
> ---
> v2: add check and free for memory dynamic allocation (David Marchand)
> v3: fix compiler error
I am not confortable applying this patch without PMD maintainers ack.