[dpdk-dev,2/2] eal: move empty declarations to doc

Message ID 1447407326-13446-2-git-send-email-david.marchand@6wind.com (mailing list archive)
State Accepted, archived
Headers

Commit Message

David Marchand Nov. 13, 2015, 9:35 a.m. UTC
No need for those forward declarations (which breaks build when asking for
C++11 or adding pedantic flag).

Signed-off-by: David Marchand <david.marchand@6wind.com>
---
 lib/librte_eal/common/include/generic/rte_cpuflags.h | 6 ++++++
 1 file changed, 6 insertions(+)
  

Comments

Thomas Monjalon Nov. 23, 2015, 3:19 p.m. UTC | #1
2015-11-13 10:35, David Marchand:
> No need for those forward declarations (which breaks build when asking for
> C++11 or adding pedantic flag).
> 
> Signed-off-by: David Marchand <david.marchand@6wind.com>

Applied, thanks
  

Patch

diff --git a/lib/librte_eal/common/include/generic/rte_cpuflags.h b/lib/librte_eal/common/include/generic/rte_cpuflags.h
index 61c4db1..5738a2a 100644
--- a/lib/librte_eal/common/include/generic/rte_cpuflags.h
+++ b/lib/librte_eal/common/include/generic/rte_cpuflags.h
@@ -47,12 +47,16 @@ 
 /**
  * Enumeration of all CPU features supported
  */
+#ifdef __DOXYGEN__
 enum rte_cpu_flag_t;
+#endif
 
 /**
  * Enumeration of CPU registers
  */
+#ifdef __DOXYGEN__
 enum cpu_register_t;
+#endif
 
 typedef uint32_t cpuid_registers_t[4];
 
@@ -100,8 +104,10 @@  rte_cpu_get_features(uint32_t leaf, uint32_t subleaf, cpuid_registers_t out);
  *     0 if flag is not available
  *     -ENOENT if flag is invalid
  */
+#ifdef __DOXYGEN__
 static inline int
 rte_cpu_get_flag_enabled(enum rte_cpu_flag_t feature);
+#endif
 
 /**
  * This function checks that the currently used CPU supports the CPU features