diff options
Diffstat (limited to 'src/xine-utils')
-rw-r--r-- | src/xine-utils/attributes.h | 12 | ||||
-rw-r--r-- | src/xine-utils/ring_buffer.c | 11 | ||||
-rw-r--r-- | src/xine-utils/xine_check.c | 5 |
3 files changed, 19 insertions, 9 deletions
diff --git a/src/xine-utils/attributes.h b/src/xine-utils/attributes.h index 4d22226ac..b533286c8 100644 --- a/src/xine-utils/attributes.h +++ b/src/xine-utils/attributes.h @@ -69,4 +69,16 @@ # endif #endif +/* Format attributes */ +#ifdef SUPPORT_ATTRIBUTE_FORMAT +# define XINE_FORMAT_PRINTF(fmt,var) __attribute__((format(printf, fmt, var))) +#else +# define XINE_FORMAT_PRINTF(fmt,var) +#endif +#ifdef SUPPORT_ATTRIBUTE_FORMAT_ARG +# define XINE_FORMAT_PRINTF_ARG(fmt) __attribute__((format_arg(fmt))) +#else +# define XINE_FORMAT_PRINTF_ARG(fmt) +#endif + #endif /* ATTRIBUTE_H_ */ diff --git a/src/xine-utils/ring_buffer.c b/src/xine-utils/ring_buffer.c index 0dfd370f1..dc8ddbf80 100644 --- a/src/xine-utils/ring_buffer.c +++ b/src/xine-utils/ring_buffer.c @@ -70,11 +70,12 @@ struct xine_ring_buffer_s { uint8_t *buffer_end; size_t free_size; /* size of the free zone */ - pthread_cond_t free_size_cond; - int free_size_needed; - size_t full_size; /* size of the full zone */ + + pthread_cond_t free_size_cond; pthread_cond_t full_size_cond; + + int free_size_needed; int full_size_needed; xine_pool_t *chunk_pool; @@ -84,9 +85,9 @@ struct xine_ring_buffer_s { uint8_t *extra_buffer; size_t extra_buffer_size; - int EOS; - pthread_mutex_t lock; + + int EOS; }; /* Constructor */ diff --git a/src/xine-utils/xine_check.c b/src/xine-utils/xine_check.c index 43e046a45..f6a0498e8 100644 --- a/src/xine-utils/xine_check.c +++ b/src/xine-utils/xine_check.c @@ -72,10 +72,7 @@ #endif /* !__linux__ */ -static void -#ifdef __GNUC__ -__attribute__((format (printf, 3, 4))) -#endif +static void XINE_FORMAT_PRINTF(3, 4) set_hc_result(xine_health_check_t* hc, int state, const char *format, ...) { |