From ae139d8b6bc36fdc657369ed25dc331df967e35e Mon Sep 17 00:00:00 2001 From: Yong Bakos Date: Sat, 17 Sep 2016 15:04:32 -0700 Subject: [PATCH] util: Document GCC attributes Add doxygen comment blocks so these annotations are documented in the html documentation. Signed-off-by: Yong Bakos Reviewed-by: Pekka Paalanen --- 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 9b7a4b9..7b280d1 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.4