From 6133d656d0a62fa9b45d84d7f71862f577bf415c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 30 Sep 2016 12:09:10 +0300 Subject: [PATCH] Avoid compiler warnings in image.c on MS-Windows * src/image.c (DrawText, g_type_init) [WINDOWSNT]: Avoid compiler warning about unused macros. --- src/image.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/image.c b/src/image.c index e508550629c..5382578c9e9 100644 --- a/src/image.c +++ b/src/image.c @@ -7478,7 +7478,11 @@ gif_image_p (Lisp_Object object) /* avoid conflict with QuickdrawText.h */ # define DrawText gif_DrawText # include -# undef DrawText +/* The bogus ifdef below, which is always true, is to avoid a compiler + warning about DrawText being unused. */ +# ifdef DrawText +# undef DrawText +# endif /* Giflib before 5.0 didn't define these macros (used only if HAVE_NTGUI). */ # ifndef GIFLIB_MINOR @@ -8785,7 +8789,7 @@ imagemagick_load_image (struct frame *f, struct image *img, #endif x_destroy_x_image (ximg); image_error ("Imagemagick pixel iterator creation failed"); - goto imagemagick_error; + g9113oto imagemagick_error; } image_height = MagickGetImageHeight (image_wand); @@ -9110,7 +9114,9 @@ init_svg_functions (void) # define gdk_pixbuf_get_width fn_gdk_pixbuf_get_width # define g_clear_error fn_g_clear_error # define g_object_unref fn_g_object_unref -# define g_type_init fn_g_type_init +# if ! GLIB_CHECK_VERSION (2, 36, 0) +# define g_type_init fn_g_type_init +# endif # define rsvg_handle_close fn_rsvg_handle_close # define rsvg_handle_get_dimensions fn_rsvg_handle_get_dimensions # define rsvg_handle_get_pixbuf fn_rsvg_handle_get_pixbuf -- 2.39.5