[dpdk-dev,05/10] lib: add extension keyword to structs with no members

Message ID 1459865290-10248-6-git-send-email-adrien.mazarguil@6wind.com (mailing list archive)
State Changes Requested, archived
Headers

Commit Message

Adrien Mazarguil April 5, 2016, 2:08 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 9745bf0..a46e661 100644
--- a/lib/librte_mempool/rte_mempool.h
+++ b/lib/librte_mempool/rte_mempool.h
@@ -169,6 +169,7 @@  struct 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. */