From 75bf6ecd2173d7e6b37b9709502997fbf75b2a90 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 15 Jul 2016 23:06:28 +0200 Subject: Fix warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/libcoopgamma.h | 136 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 83 insertions(+), 53 deletions(-) (limited to 'src/libcoopgamma.h') diff --git a/src/libcoopgamma.h b/src/libcoopgamma.h index 341bd1a..e4764bd 100644 --- a/src/libcoopgamma.h +++ b/src/libcoopgamma.h @@ -20,11 +20,19 @@ +#include #include #include +#if defined(__clang__) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wdocumentation" +#endif + + + /** * Unmarshal was successful */ @@ -266,7 +274,7 @@ typedef struct libcoopgamma_ramps##suffix \ */ \ type* blue; \ \ -} libcoopgamma_ramps##suffix##_t; +} libcoopgamma_ramps##suffix##_t /** * `typedef struct libcoopgamma_ramps8 libcoopgamma_ramps8_t` @@ -317,11 +325,6 @@ LIBCOOPGAMMA_RAMPS__(d, double); */ typedef struct libcoopgamma_filter { - /** - * The data type and bit-depth of the ramp stops - */ - libcoopgamma_depth_t depth; - /** * The priority of the filter, higher priority * is applied first. The gamma correction should @@ -349,6 +352,11 @@ typedef struct libcoopgamma_filter */ libcoopgamma_lifespan_t lifespan; + /** + * The data type and bit-depth of the ramp stops + */ + libcoopgamma_depth_t depth; + /** * The gamma ramp adjustments of the filter */ @@ -404,6 +412,17 @@ typedef struct libcoopgamma_crtc_info */ libcoopgamma_depth_t depth; + /** + * Is gamma adjustments supported on the CRTC? + * If not, `.depth`, `.red_size`, `.green_size`, + * and `.blue_size` are undefined + */ + libcoopgamma_support_t supported; + +#if INT_MAX != LONG_MAX + int padding__; +#endif + /** * The number of stops in the red ramp */ @@ -419,13 +438,6 @@ typedef struct libcoopgamma_crtc_info */ size_t blue_size; - /** - * Is gamma adjustments supported on the CRTC? - * If not, `.depth`, `.red_size`, `.green_size`, - * and `.blue_size` are undefined - */ - libcoopgamma_support_t supported; - } libcoopgamma_crtc_info_t; @@ -436,6 +448,18 @@ typedef struct libcoopgamma_crtc_info */ typedef struct libcoopgamma_filter_query { + /** + * Do no return filters with higher + * priority than this value + */ + int64_t high_priority; + + /** + * Do no return filters with lower + * priority than this value + */ + int64_t low_priority; + /** * The CRTC for which the the current * filters shall returned @@ -448,17 +472,9 @@ typedef struct libcoopgamma_filter_query */ int coalesce; - /** - * Do no return filters with higher - * priority than this value - */ - int64_t high_priority; - - /** - * Do no return filters with lower - * priority than this value - */ - int64_t low_priority; +#if INT_MAX != LONG_MAX + int padding__; +#endif } libcoopgamma_filter_query_t; @@ -527,11 +543,6 @@ typedef struct libcoopgamma_queried_filter */ typedef struct libcoopgamma_filter_table { - /** - * The data type and bit-depth of the ramp stops - */ - libcoopgamma_depth_t depth; - /** * The number of stops in the red ramp */ @@ -564,6 +575,15 @@ typedef struct libcoopgamma_filter_table */ libcoopgamma_queried_filter_t* filters; + /** + * The data type and bit-depth of the ramp stops + */ + libcoopgamma_depth_t depth; + +#if INT_MAX != LONG_MAX + int padding__; +#endif + } libcoopgamma_filter_table_t; @@ -609,23 +629,46 @@ typedef struct libcoopgamma_error */ typedef struct libcoopgamma_context { + /** + * The error of the last failed function call + * + * This member is undefined after successful function call + */ + libcoopgamma_error_t error; + /** * File descriptor for the socket */ int fd; /** - * The error of the last failed function call - * - * This member is undefined after successful function call + * Whether `libcoopgamma_synchronise` have + * read the empty end-of-headers line */ - libcoopgamma_error_t error; + int have_all_headers; + + /** + * Whether `libcoopgamma_synchronise` is reading + * a corrupt but recoverable message + */ + int bad_message; + +#if INT_MAX != LONG_MAX + int padding__; +#endif /** * Message ID of the next message */ uint32_t message_id; + /** + * The ID of outbound message to which the inbound + * message being read by `libcoopgamma_synchronise` + * is a response + */ + uint32_t in_response_to; + /** * Buffer with the outbound message */ @@ -678,25 +721,6 @@ typedef struct libcoopgamma_context */ size_t curline; - /** - * The ID of outbound message to which the inbound - * message being read by `libcoopgamma_synchronise` - * is a response - */ - uint32_t in_response_to; - - /** - * Whether `libcoopgamma_synchronise` have - * read the empty end-of-headers line - */ - int have_all_headers; - - /** - * Whether `libcoopgamma_synchronise` is reading - * a corrupt but recoverable message - */ - int bad_message; - } libcoopgamma_context_t; @@ -768,7 +792,7 @@ typedef struct libcoopgamma_async_context * `this->red_size`, `this->green_size`, and `this->blue_size` must already be set * * @param this The record to initialise - * @para width The `sizeof(*(this->red))` + * @param width The `sizeof(*(this->red))` * @return Zero on success, -1 on error */ int (libcoopgamma_ramps_initialise)(void* restrict, size_t); @@ -1468,5 +1492,11 @@ int libcoopgamma_set_gamma_sync(libcoopgamma_filter_t* restrict, libcoopgamma_de +#if defined(__clang__) +# pragma GCC diagnostic pop +#endif + + + #endif -- cgit v1.2.3-70-g09d2