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

Message ID 52bce4970e485731a45c4839de2ae9e8178cdf13.1467905467.git.adrien.mazarguil@6wind.com (mailing list archive)
State Superseded, archived
Headers

Commit Message

Adrien Mazarguil July 7, 2016, 3:49 p.m. UTC
  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@6wind.com>
---
 lib/librte_mempool/rte_mempool.h | 1 +
 1 file changed, 1 insertion(+)
  

Patch

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. */