core: group the GCC attributes together
authorBartosz Golaszewski <bartekgola@gmail.com>
Mon, 2 Oct 2017 12:48:03 +0000 (14:48 +0200)
committerBartosz Golaszewski <bartekgola@gmail.com>
Mon, 2 Oct 2017 12:48:03 +0000 (14:48 +0200)
Put the defines wrapping the gcc attributes in the same place
in gpiod.h.

Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
include/gpiod.h

index ca6412b6e962eeb5b98b32d5fb5dc5f46dce66cc..2e23b5cd2cd162dabcfda04b7e0159e6920e169f 100644 (file)
@@ -44,6 +44,11 @@ struct gpiod_chip_iter;
  */
 #define GPIOD_API              __attribute__((visibility("default")))
 
+/**
+ * @brief Marks a function argument or variable as potentially unused.
+ */
+#define GPIOD_UNUSED           __attribute__((unused))
+
 /**
  * @brief Shift 1 by given offset.
  * @param nr Bit position.
@@ -51,11 +56,6 @@ struct gpiod_chip_iter;
  */
 #define GPIOD_BIT(nr)          (1UL << (nr))
 
-/**
- * @brief Marks a function argument or variable as potentially unused.
- */
-#define GPIOD_UNUSED           __attribute__((unused))
-
 /**
  * @}
  *