aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYAMAMOTO Mitsuharu2019-04-15 12:39:05 +0900
committerYAMAMOTO Mitsuharu2019-04-15 12:39:05 +0900
commitda3e3fc7971eab2391a745d9429c6c70bc70e27c (patch)
tree96fbeada3c4dfaf14d9bb02b364d88caeada8d35 /src
parent9800df69cb7003bda1f2b98d6f11e89ba95afb9b (diff)
downloademacs-da3e3fc7971eab2391a745d9429c6c70bc70e27c.tar.gz
emacs-da3e3fc7971eab2391a745d9429c6c70bc70e27c.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/image.c4
-rw-r--r--src/xterm.c4
2 files changed, 7 insertions, 1 deletions
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,
7043 colors generated, and mgr->cinfo.colormap is a two-dimensional array 7043 colors generated, and mgr->cinfo.colormap is a two-dimensional array
7044 of color indices in the range 0..mgr->cinfo.actual_number_of_colors. 7044 of color indices in the range 0..mgr->cinfo.actual_number_of_colors.
7045 No more than 255 colors will be generated. */ 7045 No more than 255 colors will be generated. */
7046#ifndef USE_CAIRO
7046 USE_SAFE_ALLOCA; 7047 USE_SAFE_ALLOCA;
7048#endif
7047 { 7049 {
7048 if (mgr->cinfo.out_color_components > 2) 7050 if (mgr->cinfo.out_color_components > 2)
7049 ir = 0, ig = 1, ib = 2; 7051 ir = 0, ig = 1, ib = 2;
@@ -7127,8 +7129,8 @@ jpeg_load_body (struct frame *f, struct image *img,
7127 7129
7128 /* Put ximg into the image. */ 7130 /* Put ximg into the image. */
7129 image_put_x_image (f, img, ximg, 0); 7131 image_put_x_image (f, img, ximg, 0);
7130#endif
7131 SAFE_FREE (); 7132 SAFE_FREE ();
7133#endif
7132 return 1; 7134 return 1;
7133} 7135}
7134 7136
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)
2989} 2989}
2990 2990
2991 2991
2992#ifndef USE_CAIRO
2992static void 2993static void
2993x_composite_image (struct glyph_string *s, Pixmap dest, 2994x_composite_image (struct glyph_string *s, Pixmap dest,
2994 int srcX, int srcY, int dstX, int dstY, 2995 int srcX, int srcY, int dstX, int dstY,
@@ -3028,6 +3029,7 @@ x_composite_image (struct glyph_string *s, Pixmap dest,
3028 srcX, srcY, 3029 srcX, srcY,
3029 width, height, dstX, dstY); 3030 width, height, dstX, dstY);
3030} 3031}
3032#endif /* !USE_CAIRO */
3031 3033
3032 3034
3033/* Draw foreground of image glyph string S. */ 3035/* Draw foreground of image glyph string S. */
@@ -3335,7 +3337,9 @@ x_draw_image_glyph_string (struct glyph_string *s)
3335 int box_line_hwidth = eabs (s->face->box_line_width); 3337 int box_line_hwidth = eabs (s->face->box_line_width);
3336 int box_line_vwidth = max (s->face->box_line_width, 0); 3338 int box_line_vwidth = max (s->face->box_line_width, 0);
3337 int height; 3339 int height;
3340#ifndef USE_CAIRO
3338 Pixmap pixmap = None; 3341 Pixmap pixmap = None;
3342#endif
3339 3343
3340 height = s->height; 3344 height = s->height;
3341 if (s->slice.y == 0) 3345 if (s->slice.y == 0)