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

Message ID 1459865290-10248-11-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
  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@6wind.com>
---
 lib/librte_eal/common/include/generic/rte_memcpy.h | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
  

Patch

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_ */