[v1] eal: ignore alignment warnings for x86

Message ID 20200429052624.20742-1-haiyue.wang@intel.com (mailing list archive)
State Superseded, archived
Headers
Series [v1] eal: ignore alignment warnings for x86 |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-nxp-Performance success Performance Testing PASS
ci/travis-robot warning Travis build: failed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/Intel-compilation success Compilation OK

Commit Message

Wang, Haiyue April 29, 2020, 5:26 a.m. UTC
  There several alignment warnings when including rte_memcpy header file
externally like OVS for x86.

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
---
 lib/librte_eal/x86/include/rte_memcpy.h | 4 ++++
 1 file changed, 4 insertions(+)
  

Patch

diff --git a/lib/librte_eal/x86/include/rte_memcpy.h b/lib/librte_eal/x86/include/rte_memcpy.h
index ba44c4a32..6f5e0feb4 100644
--- a/lib/librte_eal/x86/include/rte_memcpy.h
+++ b/lib/librte_eal/x86/include/rte_memcpy.h
@@ -22,6 +22,10 @@ 
 extern "C" {
 #endif
 
+#ifndef __INTEL_COMPILER
+#pragma GCC diagnostic ignored "-Wcast-align"
+#endif
+
 /**
  * Copy bytes from one location to another. The locations must not overlap.
  *