[PATCH wayland] util: Document GCC attributes

Yong Bakos junk at humanoriented.com
Sat Sep 17 22:04:32 UTC 2016


From: Yong Bakos <ybakos at humanoriented.com>

Add doxygen comment blocks so these annotations are documented in the html
documentation.

Signed-off-by: Yong Bakos <ybakos at humanoriented.com>
---
 src/wayland-util.h | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/wayland-util.h b/src/wayland-util.h
index cacc122..f695266 100644
--- a/src/wayland-util.h
+++ b/src/wayland-util.h
@@ -40,21 +40,28 @@
 extern "C" {
 #endif
 
-/* GCC visibility */
+/** Visibility attribute */
 #if defined(__GNUC__) && __GNUC__ >= 4
 #define WL_EXPORT __attribute__ ((visibility("default")))
 #else
 #define WL_EXPORT
 #endif
 
-/* Deprecated attribute */
+/** Deprecated attribute */
 #if defined(__GNUC__) && __GNUC__ >= 4
 #define WL_DEPRECATED __attribute__ ((deprecated))
 #else
 #define WL_DEPRECATED
 #endif
 
-/* Printf annotation */
+/**
+ * Printf-style argument attribute
+ *
+ * \param x Ordinality of the format string argument
+ * \param y Ordinality of the argument to check against the format string
+ *
+ * \sa https://gcc.gnu.org/onlinedocs/gcc-3.2.1/gcc/Function-Attributes.html
+ */
 #if defined(__GNUC__) && __GNUC__ >= 4
 #define WL_PRINTF(x, y) __attribute__((__format__(__printf__, x, y)))
 #else
-- 
2.7.2



More information about the wayland-devel mailing list