[PATCH weston] clients/stacking: Silence a compiler warning

Quentin Glidic sardemff7+wayland at sardemff7.net
Sat Oct 1 09:21:39 UTC 2016


On 29/09/2016 00:18, Armin Krezović wrote:
> This patch fixes a compiler warning when building with
> clang, since it doesn't support gnu_printf attribute.
>
> v2:
>
>  - Switch to WL_PRINTF per suggestion from Eric Engestrom.
>
> v3:
>
>  - Explicitly include wayland-util.h
>
> Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>
> Signed-off-by: Armin Krezović <krezovic.armin at gmail.com>

Thanks:
Reviewed-by: Quentin Glidic <sardemff7+git at sardemff7.net>

And pushed:
72f68c5..eaf5841  master -> master

Cheers,


> ---
>  clients/stacking.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/clients/stacking.c b/clients/stacking.c
> index 4285a17..0682e60 100644
> --- a/clients/stacking.c
> +++ b/clients/stacking.c
> @@ -32,6 +32,7 @@
>
>  #include <linux/input.h>
>  #include <cairo.h>
> +#include <wayland-util.h>
>
>  #include "shared/helpers.h"
>  #include "window.h"
> @@ -184,7 +185,7 @@ fullscreen_handler(struct window *window, void *data)
>
>  static void
>  draw_string(cairo_t *cr,
> -            const char *fmt, ...) __attribute__((format (gnu_printf, 2, 3)));
> +            const char *fmt, ...) WL_PRINTF(2, 3);
>
>  static void
>  draw_string(cairo_t *cr,
>


-- 

Quentin “Sardem FF7” Glidic


More information about the wayland-devel mailing list