From: Cristy Date: Sun, 11 Nov 2018 15:46:30 +0000 (-0500) Subject: ... X-Git-Tag: 7.0.8-15~92 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=94eb2eca66c92dc3f9b556323411bbbfdb44ad6c;p=imagemagick ... --- diff --git a/MagickCore/blob.h b/MagickCore/blob.h index 30b33a578..1a1eb49b4 100644 --- a/MagickCore/blob.h +++ b/MagickCore/blob.h @@ -52,7 +52,7 @@ extern MagickExport CustomStreamInfo *DestroyCustomStreamInfo(CustomStreamInfo *); extern MagickExport FILE - *GetBlobFileHandle(const Image *); + *GetBlobFileHandle(const Image *) magick_attribute((__pure__)); extern MagickExport Image *BlobToImage(const ImageInfo *,const void *,const size_t,ExceptionInfo *), @@ -62,22 +62,22 @@ extern MagickExport Image extern MagickExport MagickBooleanType BlobToFile(char *,const void *,const size_t,ExceptionInfo *), FileToImage(Image *,const char *,ExceptionInfo *), - GetBlobError(const Image *), + GetBlobError(const Image *) magick_attribute((__pure__)), ImageToFile(Image *,char *,ExceptionInfo *), InjectImageBlob(const ImageInfo *,Image *,Image *,const char *, ExceptionInfo *), - IsBlobExempt(const Image *), - IsBlobSeekable(const Image *), - IsBlobTemporary(const Image *); + IsBlobExempt(const Image *) magick_attribute((__pure__)), + IsBlobSeekable(const Image *) magick_attribute((__pure__)), + IsBlobTemporary(const Image *) magick_attribute((__pure__)); extern MagickExport MagickSizeType GetBlobSize(const Image *); extern MagickExport StreamHandler - GetBlobStreamHandler(const Image *); + GetBlobStreamHandler(const Image *) magick_attribute((__pure__)); extern MagickExport void - *GetBlobStreamData(const Image *), + *GetBlobStreamData(const Image *) magick_attribute((__pure__)), DestroyBlob(Image *), DuplicateBlob(Image *,const Image *), *FileToBlob(const char *,const size_t,size_t *,ExceptionInfo *), diff --git a/MagickCore/cache-view.h b/MagickCore/cache-view.h index f6c07bf49..e0092fb91 100644 --- a/MagickCore/cache-view.h +++ b/MagickCore/cache-view.h @@ -55,13 +55,13 @@ extern MagickExport CacheView *DestroyCacheView(CacheView *); extern MagickExport ClassType - GetCacheViewStorageClass(const CacheView *); + GetCacheViewStorageClass(const CacheView *) magick_attribute((__pure__)); extern MagickExport ColorspaceType - GetCacheViewColorspace(const CacheView *); + GetCacheViewColorspace(const CacheView *) magick_attribute((__pure__)); extern MagickExport const Image - *GetCacheViewImage(const CacheView *); + *GetCacheViewImage(const CacheView *) magick_attribute((__pure__)); extern MagickExport const Quantum *GetCacheViewVirtualPixels(const CacheView *,const ssize_t,const ssize_t, @@ -69,7 +69,8 @@ extern MagickExport const Quantum *GetCacheViewVirtualPixelQueue(const CacheView *) magick_hot_spot; extern MagickExport const void - *GetCacheViewVirtualMetacontent(const CacheView *); + *GetCacheViewVirtualMetacontent(const CacheView *) + magick_attribute((__pure__)); extern MagickExport MagickBooleanType GetOneCacheViewAuthenticPixel(const CacheView *,const ssize_t,const ssize_t, @@ -87,7 +88,7 @@ extern MagickExport MagickBooleanType magick_hot_spot; extern MagickExport MagickSizeType - GetCacheViewExtent(const CacheView *); + GetCacheViewExtent(const CacheView *) magick_attribute((__pure__)); extern MagickExport Quantum *GetCacheViewAuthenticPixelQueue(CacheView *) magick_hot_spot, diff --git a/MagickCore/log.c b/MagickCore/log.c index 6e15b118e..a9709a481 100644 --- a/MagickCore/log.c +++ b/MagickCore/log.c @@ -220,13 +220,13 @@ static SemaphoreInfo Forward declarations. */ static LogHandlerType - ParseLogHandlers(const char *); + ParseLogHandlers(const char *) magick_attribute((__pure__)); static LogInfo *GetLogInfo(const char *,ExceptionInfo *); static MagickBooleanType - IsLogCacheInstantiated(ExceptionInfo *), + IsLogCacheInstantiated(ExceptionInfo *) magick_attribute((__pure__)), LoadLogCache(LinkedListInfo *,const char *,const char *,const size_t, ExceptionInfo *); diff --git a/MagickCore/log.h b/MagickCore/log.h index 6891ebfd7..d868d75e3 100644 --- a/MagickCore/log.h +++ b/MagickCore/log.h @@ -78,7 +78,7 @@ extern MagickExport LogEventType SetLogEventMask(const char *); extern MagickExport MagickBooleanType - IsEventLogging(void), + IsEventLogging(void) magick_attribute((__pure__)), ListLogInfo(FILE *,ExceptionInfo *), LogMagickEvent(const LogEventType,const char *,const char *,const size_t, const char *,...) magick_attribute((__format__ (__printf__,5,6))), diff --git a/MagickCore/magick.h b/MagickCore/magick.h index 87af76466..71caafcdf 100644 --- a/MagickCore/magick.h +++ b/MagickCore/magick.h @@ -104,10 +104,10 @@ extern MagickExport const char *GetMagickMimeType(const MagickInfo *); extern MagickExport DecodeImageHandler - *GetImageDecoder(const MagickInfo *); + *GetImageDecoder(const MagickInfo *) magick_attribute((__pure__)); extern MagickExport EncodeImageHandler - *GetImageEncoder(const MagickInfo *); + *GetImageEncoder(const MagickInfo *) magick_attribute((__pure__)); extern MagickExport int GetMagickPrecision(void), @@ -115,17 +115,21 @@ extern MagickExport int extern MagickExport MagickBooleanType GetImageMagick(const unsigned char *,const size_t,char *), - GetMagickAdjoin(const MagickInfo *), - GetMagickBlobSupport(const MagickInfo *), - GetMagickDecoderSeekableStream(const MagickInfo *), - GetMagickDecoderThreadSupport(const MagickInfo *), - GetMagickEncoderSeekableStream(const MagickInfo *), - GetMagickEncoderThreadSupport(const MagickInfo *), - GetMagickEndianSupport(const MagickInfo *), - GetMagickRawSupport(const MagickInfo *), - GetMagickStealth(const MagickInfo *), - GetMagickUseExtension(const MagickInfo *), - IsMagickCoreInstantiated(void), + GetMagickAdjoin(const MagickInfo *) magick_attribute((__pure__)), + GetMagickBlobSupport(const MagickInfo *) magick_attribute((__pure__)), + GetMagickDecoderSeekableStream(const MagickInfo *) + magick_attribute((__pure__)), + GetMagickDecoderThreadSupport(const MagickInfo *) + magick_attribute((__pure__)), + GetMagickEncoderSeekableStream(const MagickInfo *) + magick_attribute((__pure__)), + GetMagickEncoderThreadSupport(const MagickInfo *) + magick_attribute((__pure__)), + GetMagickEndianSupport(const MagickInfo *) magick_attribute((__pure__)), + GetMagickRawSupport(const MagickInfo *) magick_attribute((__pure__)), + GetMagickStealth(const MagickInfo *) magick_attribute((__pure__)), + GetMagickUseExtension(const MagickInfo *) magick_attribute((__pure__)), + IsMagickCoreInstantiated(void) magick_attribute((__pure__)), RegisterMagickInfo(MagickInfo *), UnregisterMagickInfo(const char *); diff --git a/MagickCore/pixel.h b/MagickCore/pixel.h index d71b046ce..fd13376b8 100644 --- a/MagickCore/pixel.h +++ b/MagickCore/pixel.h @@ -230,8 +230,9 @@ extern MagickExport MagickBooleanType const PixelInterpolateMethod,const double,const double,PixelInfo *, ExceptionInfo *), IsFuzzyEquivalencePixel(const Image *,const Quantum *,const Image *, - const Quantum *), - IsFuzzyEquivalencePixelInfo(const PixelInfo *,const PixelInfo *), + const Quantum *) magick_attribute((__pure__)), + IsFuzzyEquivalencePixelInfo(const PixelInfo *,const PixelInfo *) + magick_attribute((__pure__)), SetPixelMetaChannels(Image *,const size_t,ExceptionInfo *); extern MagickExport MagickRealType diff --git a/coders/miff.c b/coders/miff.c index 6a6e5bf3a..ddd964188 100644 --- a/coders/miff.c +++ b/coders/miff.c @@ -179,8 +179,7 @@ static void *AcquireCompressionMemory(void *context,const size_t items, #endif #if defined(MAGICKCORE_BZLIB_DELEGATE) -static void *AcquireBZIPMemory(void *context,int items,int size) - magick_attribute((__malloc__)); +static void *AcquireBZIPMemory(void *,int,int) magick_attribute((__malloc__)); static void *AcquireBZIPMemory(void *context,int items,int size) { @@ -189,7 +188,7 @@ static void *AcquireBZIPMemory(void *context,int items,int size) #endif #if defined(MAGICKCORE_LZMA_DELEGATE) -static void *AcquireLZMAMemory(void *context,size_t items,size_t size) +static void *AcquireLZMAMemory(void *,size_t,size_t) magick_attribute((__malloc__)); static void *AcquireLZMAMemory(void *context,size_t items,size_t size) @@ -199,8 +198,8 @@ static void *AcquireLZMAMemory(void *context,size_t items,size_t size) #endif #if defined(MAGICKCORE_ZLIB_DELEGATE) -static voidpf AcquireZIPMemory(voidpf context,unsigned int items, - unsigned int size) magick_attribute((__malloc__)); +static voidpf AcquireZIPMemory(voidpf,unsigned int,unsigned int) + magick_attribute((__malloc__)); static voidpf AcquireZIPMemory(voidpf context,unsigned int items, unsigned int size) diff --git a/coders/null.c b/coders/null.c index 157a62d2c..e8e9e9b5d 100644 --- a/coders/null.c +++ b/coders/null.c @@ -63,7 +63,8 @@ Forward declarations. */ static MagickBooleanType - WriteNULLImage(const ImageInfo *,Image *,ExceptionInfo *); + WriteNULLImage(const ImageInfo *,Image *,ExceptionInfo *) + magick_attribute((__pure__)); /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/coders/svg.c b/coders/svg.c index b2b1622b1..beb3ea7f6 100644 --- a/coders/svg.c +++ b/coders/svg.c @@ -2923,6 +2923,9 @@ static void SVGComment(void *context,const xmlChar *value) (void) ConcatenateString(&svg_info->comment,(const char *) value); } +static void SVGWarning(void *,const char *,...) + magick_attribute((__format__ (__printf__,2,3))); + static void SVGWarning(void *context,const char *format,...) { char @@ -2955,6 +2958,9 @@ static void SVGWarning(void *context,const char *format,...) va_end(operands); } +static void SVGError(void *,const char *,...) + magick_attribute((__format__ (__printf__,2,3))); + static void SVGError(void *context,const char *format,...) { char diff --git a/coders/tiff.c b/coders/tiff.c index 2da50712f..3f9105438 100644 --- a/coders/tiff.c +++ b/coders/tiff.c @@ -635,6 +635,9 @@ static int TIFFCloseBlob(thandle_t image) return(0); } +static void TIFFErrors(const char *,const char *,va_list) + magick_attribute((__format__ (__printf__,2,0))); + static void TIFFErrors(const char *module,const char *format,va_list error) { char @@ -980,6 +983,9 @@ static void TIFFUnmapBlob(thandle_t image,tdata_t base,toff_t size) (void) size; } +static void TIFFWarnings(const char *,const char *,va_list) + magick_attribute((__format__ (__printf__,2,0))); + static void TIFFWarnings(const char *module,const char *format,va_list warning) { char diff --git a/coders/xpm.c b/coders/xpm.c index 757dfa633..c2bf1b082 100644 --- a/coders/xpm.c +++ b/coders/xpm.c @@ -173,6 +173,9 @@ static char *NextXPMLine(char *p) return(p); } +static char *ParseXPMColor(char *,MagickBooleanType) + magick_attribute((__pure__)); + static char *ParseXPMColor(char *color,MagickBooleanType search_start) { #define NumberTargets 6