From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adrien Mazarguil Subject: [PATCH 08/10] lib: add extension keyword to forward reference to enum types Date: Tue, 5 Apr 2016 16:08:08 +0200 Message-ID: <1459865290-10248-9-git-send-email-adrien.mazarguil@6wind.com> References: <1459865290-10248-1-git-send-email-adrien.mazarguil@6wind.com> Cc: Bruce Richardson , Thomas Monjalon To: dev@dpdk.org Return-path: Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by dpdk.org (Postfix) with ESMTP id 3AD2137A6 for ; Tue, 5 Apr 2016 16:08:43 +0200 (CEST) Received: by mail-wm0-f41.google.com with SMTP id u206so5982566wme.1 for ; Tue, 05 Apr 2016 07:08:43 -0700 (PDT) In-Reply-To: <1459865290-10248-1-git-send-email-adrien.mazarguil@6wind.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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: ISO C forbids forward references to `enum' types Signed-off-by: Adrien Mazarguil --- lib/librte_eal/common/include/generic/rte_cpuflags.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/librte_eal/common/include/generic/rte_cpuflags.h b/lib/librte_eal/common/include/generic/rte_cpuflags.h index c1da357..71321f3 100644 --- a/lib/librte_eal/common/include/generic/rte_cpuflags.h +++ b/lib/librte_eal/common/include/generic/rte_cpuflags.h @@ -44,6 +44,7 @@ /** * Enumeration of all CPU features supported */ +__extension__ enum rte_cpu_flag_t; /** @@ -55,6 +56,7 @@ enum rte_cpu_flag_t; * flag name * NULL if flag ID is invalid */ +__extension__ const char * rte_cpu_get_flag_name(enum rte_cpu_flag_t feature); @@ -68,6 +70,7 @@ rte_cpu_get_flag_name(enum rte_cpu_flag_t feature); * 0 if flag is not available * -ENOENT if flag is invalid */ +__extension__ int rte_cpu_get_flag_enabled(enum rte_cpu_flag_t feature); -- 2.1.4