]> git.eshelyaron.com Git - emacs.git/commitdiff
Pacify -Wunused-macros in --without-all builds
authorStefan Kangas <stefan@marxist.se>
Thu, 14 Jul 2022 12:02:27 +0000 (14:02 +0200)
committerStefan Kangas <stefan@marxist.se>
Thu, 14 Jul 2022 12:02:27 +0000 (14:02 +0200)
* src/image.c (IMAGE_TYPE_INIT): Make conditional on image support.

src/image.c

index aa7bb3ba66726b7b66561cc0251a238813f8839a..cc6f27612b98e516060593c7be5a42b7d0feea52 100644 (file)
@@ -1071,9 +1071,16 @@ struct image_type
      libraries on Windows), or NULL if none.  */
   bool (*init) (void);
   /* An initializer for the init field.  */
-# define IMAGE_TYPE_INIT(f) f
-#else
-# define IMAGE_TYPE_INIT(f)
+#endif
+#if defined HAVE_RSVG || defined HAVE_PNG || defined HAVE_GIF || \
+  defined HAVE_TIFF || defined HAVE_JPEG || defined HAVE_XPM || \
+  defined HAVE_NS || defined HAVE_HAIKU || defined HAVE_PGTK || \
+  defined HAVE_WEBP
+# ifdef WINDOWSNT
+#  define IMAGE_TYPE_INIT(f) f
+# else
+#  define IMAGE_TYPE_INIT(f)
+# endif
 #endif
 };