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

Arjen Nienhuis <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <CAG6W84LJ9tWU1N4D373NRhuoxUdiFQ1ZQN=-k0QxN2iS6PHOoA@mail.gmail.com>
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
<[email protected]> wrote:
> Restore (int) cast that was dropped in e7e1ac23.
>
> Signed-off-by: Bryce Harrington <[email protected]>
> ---
>  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
> [email protected]
> http://lists.cairographics.org/mailman/listinfo/cairo
-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.