[dpdk-dev] [PATCH v3 05/11] lib: work around structs with no members

Adrien Mazarguil adrien.mazarguil at 6wind.com
Thu Jul 7 17:49:27 CEST 2016


Exported header files used by applications should allow the strictest
compiler flags. Language extensions used in many places must be explicitly
marked or removed to avoid warnings and compilation failures.

This commit prevents the following errors:

 error: struct has no members

Signed-off-by: Adrien Mazarguil <adrien.mazarguil at 6wind.com>
---
 lib/librte_mempool/rte_mempool.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h
index fb7052e..fc33db8 100644
--- a/lib/librte_mempool/rte_mempool.h
+++ b/lib/librte_mempool/rte_mempool.h
@@ -169,6 +169,7 @@ STAILQ_HEAD(rte_mempool_objhdr_list, rte_mempool_objhdr);
  * In debug mode, each object stored in mempools are suffixed by this
  * trailer structure containing a cookie preventing memory corruptions.
  */
+__extension__
 struct rte_mempool_objtlr {
 #ifdef RTE_LIBRTE_MEMPOOL_DEBUG
 	uint64_t cookie;                 /**< Debug cookie. */
-- 
2.1.4



More information about the dev mailing list