[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master da3e3fc: Avoid compiler warnings on cairo build
From: |
YAMAMOTO Mitsuharu |
Subject: |
[Emacs-diffs] master da3e3fc: Avoid compiler warnings on cairo build |
Date: |
Sun, 14 Apr 2019 23:40:41 -0400 (EDT) |
branch: master
commit da3e3fc7971eab2391a745d9429c6c70bc70e27c
Author: YAMAMOTO Mitsuharu <address@hidden>
Commit: YAMAMOTO Mitsuharu <address@hidden>
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.
---
src/image.c | 4 +++-
src/xterm.c | 4 ++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/image.c b/src/image.c
index 6e415ef..c1a23ed 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 b9f4a1f..0facb52 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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master da3e3fc: Avoid compiler warnings on cairo build,
YAMAMOTO Mitsuharu <=