[cairo] [PATCH] image: Quell warning about signed/unsigned int comparison.

Arjen Nienhuis a.g.nienhuis at gmail.com
Mon Jun 10 15:51:34 PDT 2013


I think that needs extra brackets:

#define SZ_BUF ((int)(sizeof (cairo_abstract_span_renderer_t) - sizeof
(cairo_image_span_renderer_t)))

I don't know if the patch is ok though.

On Mon, Jun 10, 2013 at 9:01 PM, Bryce W. Harrington
<b.harrington at samsung.com> wrote:
> Restore (int) cast that was dropped in e7e1ac23.
>
> Signed-off-by: Bryce Harrington <b.harrington at samsung.com>
> ---
>  src/cairo-image-compositor.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/cairo-image-compositor.c b/src/cairo-image-compositor.c
> index 19372be..a79dc40 100644
> --- a/src/cairo-image-compositor.c
> +++ b/src/cairo-image-compositor.c
> @@ -1548,7 +1548,7 @@ typedef struct _cairo_image_span_renderer {
>         } mask;
>      } u;
>      uint8_t _buf[0];
> -#define SZ_BUF (sizeof (cairo_abstract_span_renderer_t) - sizeof (cairo_image_span_renderer_t))
> +#define SZ_BUF (int)(sizeof (cairo_abstract_span_renderer_t) - sizeof (cairo_image_span_renderer_t))
>  } cairo_image_span_renderer_t;
>  COMPILE_TIME_ASSERT (sizeof (cairo_image_span_renderer_t) <= sizeof (cairo_abstract_span_renderer_t));
>
> --
> 1.7.9.5
> --
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo


More information about the cairo mailing list