[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 26df9aa: Avoid compiler warning in image.c
From: |
Eli Zaretskii |
Subject: |
master 26df9aa: Avoid compiler warning in image.c |
Date: |
Tue, 14 Apr 2020 15:23:12 -0400 (EDT) |
branch: master
commit 26df9aae532827461047159836569406c707c211
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Avoid compiler warning in image.c
* src/image.c (image_can_use_native_api): Avoid compiler warnings
by making this function conditioned on HAVE_NATIVE_IMAGE_API.
(initialize_image_type): Call image_can_use_native_api only if
HAVE_NATIVE_IMAGE_API is non-zero. Reported by Basil
L. Contovounesios <address@hidden>.
---
src/image.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/src/image.c b/src/image.c
index aacaf0b..acb1e9d 100644
--- a/src/image.c
+++ b/src/image.c
@@ -6236,22 +6236,17 @@ pbm_load (struct frame *f, struct image *img)
NATIVE IMAGE HANDLING
***********************************************************************/
+#if HAVE_NATIVE_IMAGE_API
static bool
image_can_use_native_api (Lisp_Object type)
{
-#if HAVE_NATIVE_IMAGE_API
# ifdef HAVE_NTGUI
return w32_can_use_native_image_api (type);
# else
return false;
# endif
-#else
- return false;
-#endif
}
-#if HAVE_NATIVE_IMAGE_API
-
/*
* These functions are actually defined in the OS-native implementation
* file. Currently, for Windows GDI+ interface, w32image.c, but other
@@ -10224,8 +10219,10 @@ initialize_image_type (struct image_type const *type)
#ifdef WINDOWSNT
Lisp_Object typesym = builtin_lisp_symbol (type->type);
+# if HAVE_NATIVE_IMAGE_API
if (image_can_use_native_api (typesym))
return true;
+# endif
Lisp_Object tested = Fassq (typesym, Vlibrary_cache);
/* If we failed to load the library before, don't try again. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 26df9aa: Avoid compiler warning in image.c,
Eli Zaretskii <=