[dpdk-dev] [PATCH 10/10] lib: hide static functions that are never defined

Adrien Mazarguil adrien.mazarguil at 6wind.com
Tue Apr 5 16:08:10 CEST 2016


Arch-specific functions not defined for all architectures (missing on x86 in
this case) and not used anywhere should not expose a prototype.

This commit prevents the following errors:

 error: `rte_mov48' declared `static' but never defined
 error: `rte_memcpy_func' declared `static' but never defined

Signed-off-by: Adrien Mazarguil <adrien.mazarguil at 6wind.com>
---
 lib/librte_eal/common/include/generic/rte_memcpy.h | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/common/include/generic/rte_memcpy.h b/lib/librte_eal/common/include/generic/rte_memcpy.h
index 03e8477..9f70d24 100644
--- a/lib/librte_eal/common/include/generic/rte_memcpy.h
+++ b/lib/librte_eal/common/include/generic/rte_memcpy.h
@@ -64,6 +64,8 @@ rte_mov16(uint8_t *dst, const uint8_t *src);
 static inline void
 rte_mov32(uint8_t *dst, const uint8_t *src);
 
+#ifdef __DOXYGEN__
+
 /**
  * Copy 48 bytes from one location to another using optimised
  * instructions. The locations should not overlap.
@@ -76,6 +78,8 @@ rte_mov32(uint8_t *dst, const uint8_t *src);
 static inline void
 rte_mov48(uint8_t *dst, const uint8_t *src);
 
+#endif /* __DOXYGEN__ */
+
 /**
  * Copy 64 bytes from one location to another using optimised
  * instructions. The locations should not overlap.
@@ -132,13 +136,12 @@ rte_mov256(uint8_t *dst, const uint8_t *src);
 static void *
 rte_memcpy(void *dst, const void *src, size_t n);
 
-#endif /* __DOXYGEN__ */
-
 /*
  * memcpy() function used by rte_memcpy macro
  */
 static inline void *
 rte_memcpy_func(void *dst, const void *src, size_t n) __attribute__((always_inline));
 
+#endif /* __DOXYGEN__ */
 
 #endif /* _RTE_MEMCPY_H_ */
-- 
2.1.4



More information about the dev mailing list