diff options
| author | Basil L. Contovounesios | 2021-02-13 14:51:48 +0000 |
|---|---|---|
| committer | Basil L. Contovounesios | 2021-02-14 12:29:25 +0000 |
| commit | c4cc80e1fbbfb50486c6ce360f2d68e96fc45887 (patch) | |
| tree | 26ba27a5d73f417112474c10a94a7e0037f754c3 /src | |
| parent | 175ebb010477ff0e174fe5145154397f43dee2d2 (diff) | |
| download | emacs-c4cc80e1fbbfb50486c6ce360f2d68e96fc45887.tar.gz emacs-c4cc80e1fbbfb50486c6ce360f2d68e96fc45887.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/image.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/image.c b/src/image.c index cc97ca4d7cc..09370fa833d 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -99,7 +99,7 @@ static unsigned long image_alloc_image_color (struct frame *, struct image *, | |||
| 99 | Lisp_Object, unsigned long); | 99 | Lisp_Object, unsigned long); |
| 100 | #endif /* USE_CAIRO */ | 100 | #endif /* USE_CAIRO */ |
| 101 | 101 | ||
| 102 | #ifdef HAVE_PGTK | 102 | #if defined HAVE_PGTK && defined HAVE_IMAGEMAGICK |
| 103 | /* On pgtk, we don't want to create scaled image. | 103 | /* On pgtk, we don't want to create scaled image. |
| 104 | * If we create scaled image on scale=2.0 environment, | 104 | * If we create scaled image on scale=2.0 environment, |
| 105 | * the created image is half size and Gdk scales it back, | 105 | * the created image is half size and Gdk scales it back, |
| @@ -2307,12 +2307,11 @@ compute_image_rotation (struct image *img, double *rotation) | |||
| 2307 | static void | 2307 | static void |
| 2308 | image_set_transform (struct frame *f, struct image *img) | 2308 | image_set_transform (struct frame *f, struct image *img) |
| 2309 | { | 2309 | { |
| 2310 | # ifdef HAVE_IMAGEMAGICK | 2310 | # if (defined HAVE_IMAGEMAGICK \ |
| 2311 | # ifndef DONT_CREATE_TRANSFORMED_IMAGEMAGICK_IMAGE | 2311 | && !defined DONT_CREATE_TRANSFORMED_IMAGEMAGICK_IMAGE) |
| 2312 | /* ImageMagick images already have the correct transform. */ | 2312 | /* ImageMagick images already have the correct transform. */ |
| 2313 | if (EQ (image_spec_value (img->spec, QCtype, NULL), Qimagemagick)) | 2313 | if (EQ (image_spec_value (img->spec, QCtype, NULL), Qimagemagick)) |
| 2314 | return; | 2314 | return; |
| 2315 | # endif | ||
| 2316 | # endif | 2315 | # endif |
| 2317 | 2316 | ||
| 2318 | # if !defined USE_CAIRO && defined HAVE_XRENDER | 2317 | # if !defined USE_CAIRO && defined HAVE_XRENDER |