From: YAMAMOTO Mitsuharu Date: Mon, 15 Apr 2019 03:39:05 +0000 (+0900) Subject: Avoid compiler warnings on cairo build X-Git-Tag: emacs-27.0.90~3249 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=da3e3fc7971eab2391a745d9429c6c70bc70e27c;p=emacs.git Avoid compiler warnings on cairo build * src/image.c (jpeg_load_body) [USE_CAIRO]: #ifdef out USE_SAFE_ALLOCA and SAFE_FREE. * src/xterm.c (x_composite_image) [USE_CAIRO]: #ifdef out unused function. (x_draw_image_glyph_string) [USE_CAIRO]: #ifdef out unused variable pixmap. --- diff --git a/src/image.c b/src/image.c index 6e415ef1f70..c1a23edefce 100644 --- a/src/image.c +++ b/src/image.c @@ -7043,7 +7043,9 @@ jpeg_load_body (struct frame *f, struct image *img, colors generated, and mgr->cinfo.colormap is a two-dimensional array of color indices in the range 0..mgr->cinfo.actual_number_of_colors. No more than 255 colors will be generated. */ +#ifndef USE_CAIRO USE_SAFE_ALLOCA; +#endif { if (mgr->cinfo.out_color_components > 2) ir = 0, ig = 1, ib = 2; @@ -7127,8 +7129,8 @@ jpeg_load_body (struct frame *f, struct image *img, /* Put ximg into the image. */ image_put_x_image (f, img, ximg, 0); -#endif SAFE_FREE (); +#endif return 1; } diff --git a/src/xterm.c b/src/xterm.c index b9f4a1fc303..0facb524549 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -2989,6 +2989,7 @@ x_draw_glyph_string_box (struct glyph_string *s) } +#ifndef USE_CAIRO static void x_composite_image (struct glyph_string *s, Pixmap dest, int srcX, int srcY, int dstX, int dstY, @@ -3028,6 +3029,7 @@ x_composite_image (struct glyph_string *s, Pixmap dest, srcX, srcY, width, height, dstX, dstY); } +#endif /* !USE_CAIRO */ /* Draw foreground of image glyph string S. */ @@ -3335,7 +3337,9 @@ x_draw_image_glyph_string (struct glyph_string *s) int box_line_hwidth = eabs (s->face->box_line_width); int box_line_vwidth = max (s->face->box_line_width, 0); int height; +#ifndef USE_CAIRO Pixmap pixmap = None; +#endif height = s->height; if (s->slice.y == 0)