From 83b2f5e34bba21f9ce8f04719715d3b85b16a2e8 Mon Sep 17 00:00:00 2001 From: Damjan Marion Date: Tue, 27 Apr 2021 11:00:54 +0200 Subject: vppinfra: silence coverity warnings related to clib_memcpy_u32() Type: fix Change-Id: I17e7b3fca390c0b0150c4606f7c93771ee9bdbdc Signed-off-by: Damjan Marion --- src/vppinfra/memcpy.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/vppinfra/memcpy.h b/src/vppinfra/memcpy.h index 115379797d2..f3adc78d53d 100644 --- a/src/vppinfra/memcpy.h +++ b/src/vppinfra/memcpy.h @@ -6,6 +6,8 @@ #ifndef included_memcpy_h #define included_memcpy_h +#ifndef __COVERITY__ + static_always_inline void clib_memcpy_u32_x4 (u32 *dst, u32 *src) { @@ -152,4 +154,12 @@ clib_memcpy_u32 (u32 *dst, u32 *src, u32 n_left) } } +#else /* __COVERITY__ */ +static_always_inline void +clib_memcpy_u32 (u32 *dst, u32 *src, u32 n_left) +{ + memcpy (dst, src, n_left * sizeof (u32)); +} +#endif + #endif -- cgit 1.2.3-korg