aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2021-04-27 11:00:54 +0200
committerFlorin Coras <florin.coras@gmail.com>2021-04-27 14:28:48 +0000
commit83b2f5e34bba21f9ce8f04719715d3b85b16a2e8 (patch)
tree08b56bf5a04553e992af6ce27ece396e052c5809 /src
parentefe6eddcf857e50ed6634425bc0361e4a8c65c72 (diff)
vppinfra: silence coverity warnings related to clib_memcpy_u32()
Type: fix Change-Id: I17e7b3fca390c0b0150c4606f7c93771ee9bdbdc Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/vppinfra/memcpy.h10
1 files changed, 10 insertions, 0 deletions
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