eal/x86: ignore gcc 10 stringop-overflow warnings
[dpdk.git] / lib / librte_eal / x86 / include / rte_memcpy.h
index ba44c4a..9c67232 100644 (file)
 extern "C" {
 #endif
 
+#if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION >= 100000)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstringop-overflow"
+#endif
+
 /**
  * Copy bytes from one location to another. The locations must not overlap.
  *
@@ -869,6 +874,10 @@ rte_memcpy(void *dst, const void *src, size_t n)
                return rte_memcpy_generic(dst, src, n);
 }
 
+#if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION >= 100000)
+#pragma GCC diagnostic pop
+#endif
+
 #ifdef __cplusplus
 }
 #endif