emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/pgtk c4cc80e: Fix unused macro build warning in image.c


From: Basil L. Contovounesios
Subject: feature/pgtk c4cc80e: Fix unused macro build warning in image.c
Date: Sun, 14 Feb 2021 07:30:54 -0500 (EST)

branch: feature/pgtk
commit c4cc80e1fbbfb50486c6ce360f2d68e96fc45887
Author: Basil L. Contovounesios <contovob@tcd.ie>
Commit: Basil L. Contovounesios <contovob@tcd.ie>

    Fix unused macro build warning in image.c
    
    * src/image.c
    [HAVE_PGTK] (DONT_CREATE_TRANSFORMED_IMAGEMAGICK_IMAGE): Define only
    if HAVE_IMAGEMAGICK is also defined, as it is otherwise
    unused (bug#46491).
    (image_set_transform): Reduce nesting of preprocessor conditionals.
---
 src/image.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/image.c b/src/image.c
index cc97ca4..09370fa 100644
--- a/src/image.c
+++ b/src/image.c
@@ -99,7 +99,7 @@ static unsigned long image_alloc_image_color (struct frame *, 
struct image *,
                                              Lisp_Object, unsigned long);
 #endif /* USE_CAIRO */
 
-#ifdef HAVE_PGTK
+#if defined HAVE_PGTK && defined HAVE_IMAGEMAGICK
 /* On pgtk, we don't want to create scaled image.
  * If we create scaled image on scale=2.0 environment,
  * the created image is half size and Gdk scales it back,
@@ -2307,12 +2307,11 @@ compute_image_rotation (struct image *img, double 
*rotation)
 static void
 image_set_transform (struct frame *f, struct image *img)
 {
-# ifdef HAVE_IMAGEMAGICK
-#  ifndef DONT_CREATE_TRANSFORMED_IMAGEMAGICK_IMAGE
+# if (defined HAVE_IMAGEMAGICK \
+      && !defined DONT_CREATE_TRANSFORMED_IMAGEMAGICK_IMAGE)
   /* ImageMagick images already have the correct transform.  */
   if (EQ (image_spec_value (img->spec, QCtype, NULL), Qimagemagick))
     return;
-#  endif
 # endif
 
 # if !defined USE_CAIRO && defined HAVE_XRENDER



reply via email to

[Prev in Thread] Current Thread [Next in Thread]