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

Message ID 89b82c69afc0f3c704957dd80c77470e5911e07a.1467715254.git.adrien.mazarguil@6wind.com (mailing list archive)
State Superseded, archived
Headers

Commit Message

Adrien Mazarguil July 5, 2016, 10:44 a.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. */