From: Florian Margaine Date: Sun, 19 Aug 2018 21:42:57 +0000 (+0200) Subject: Fix compiler warning about unused function. X-Git-Tag: 7.0.8-11~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a92c7a67cf3f688ca1ddba0f7eae1c9d821780ef;p=imagemagick 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. --- 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)