From a92c7a67cf3f688ca1ddba0f7eae1c9d821780ef Mon Sep 17 00:00:00 2001 From: Florian Margaine Date: Sun, 19 Aug 2018 23:42:57 +0200 Subject: [PATCH] Fix compiler warning about unused function. When neither of those compiler macros are available, the compiler is going to spit a warning about the unused static function. ``` coders/miff.c:164:14: warning: 'AcquireCompressionMemory' defined but not used [-Wunused-function] static void *AcquireCompressionMemory(void *context,const size_t items, ``` Fix this by making sure the static function is only defined when it's going to be used. --- coders/miff.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/coders/miff.c b/coders/miff.c index 7d8ceaccd..5c5fc41cd 100644 --- a/coders/miff.c +++ b/coders/miff.c @@ -161,6 +161,7 @@ static MagickBooleanType IsMIFF(const unsigned char *magick,const size_t length) % */ +#if defined(MAGICKCORE_BZLIB_DELEGATE) || defined(MAGICKCORE_LZMA_DELEGATE) || defined(MAGICKCORE_ZLIB_DELEGATE) static void *AcquireCompressionMemory(void *context,const size_t items, const size_t size) { @@ -175,6 +176,7 @@ static void *AcquireCompressionMemory(void *context,const size_t items, return((void *) NULL); return(AcquireMagickMemory(extent)); } +#endif #if defined(MAGICKCORE_BZLIB_DELEGATE) static void *AcquireBZIPMemory(void *context,int items,int size) -- 2.40.0