From: Paul Eggert Date: Thu, 30 Aug 2018 17:03:43 +0000 (-0700) Subject: Pacify -Wdouble-promotion in ImageMagick code X-Git-Tag: emacs-27.0.90~4487 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=42ed35c68b7c199aa797e655fdc3547c5c3087d2;p=emacs.git Pacify -Wdouble-promotion in ImageMagick code * src/image.c (imagemagick_load_image): Use double division, and eliminate a cast. This avoids a -Wdouble-promotion warning with GCC 7.3 on Ubuntu 18.04. --- diff --git a/src/image.c b/src/image.c index 69aeab5d657..24decbc0997 100644 --- a/src/image.c +++ b/src/image.c @@ -8824,7 +8824,8 @@ imagemagick_load_image (struct frame *f, struct image *img, #endif /* HAVE_MAGICKEXPORTIMAGEPIXELS */ { size_t image_height; - MagickRealType color_scale = 65535.0 / (MagickRealType) QuantumRange; + double quantum_range = QuantumRange; + MagickRealType color_scale = 65535.0 / quantum_range; #ifdef USE_CAIRO data = xmalloc (width * height * 4); color_scale /= 256;