diff --git a/Magick++/lib/Image.cpp b/Magick++/lib/Image.cpp index db28e9efb8..0ae689c34f 100644 --- a/Magick++/lib/Image.cpp +++ b/Magick++/lib/Image.cpp @@ -3119,7 +3119,7 @@ void Magick::Image::fontTypeMetricsMultiline(const std::string &text_, drawInfo=options()->drawInfo(); drawInfo->text=const_cast(text_.c_str()); - GetMultilineTypeMetrics(image(),drawInfo,&(metrics->_typeMetric)); + (void) GetMultilineTypeMetrics(image(),drawInfo,&(metrics->_typeMetric)); drawInfo->text=0; } diff --git a/coders/json.c b/coders/json.c index fe2b5ffd52..8793a6d8a5 100644 --- a/coders/json.c +++ b/coders/json.c @@ -1092,7 +1092,7 @@ static MagickBooleanType EncodeImageAttributes(Image *image,FILE *file) JSONFormatLocaleFile(file," \"baseType\": %s,\n", CommandOptionToMnemonic(MagickTypeOptions,(ssize_t) image->type)); if (version < 1.0) - JSONFormatLocaleFile(file," \"endianness\": %s,\n", + JSONFormatLocaleFile(file," \"endianess\": %s,\n", CommandOptionToMnemonic(MagickEndianOptions,(ssize_t) image->endian)); else JSONFormatLocaleFile(file," \"endianness\": %s,\n", diff --git a/coders/tiff.c b/coders/tiff.c index 9c22d7ce24..8945851172 100644 --- a/coders/tiff.c +++ b/coders/tiff.c @@ -2790,13 +2790,13 @@ static MagickBooleanType GetTIFFInfo(const ImageInfo *image_info,TIFF *tiff, extent; uint32 - rows, - rows_per_strip; + rows = 0, + rows_per_strip = 0; extent=TIFFScanlineSize(tiff); rows_per_strip=TIFFStripSizeDefault/(extent == 0 ? 1 : (uint32) extent); rows_per_strip=16*(((rows_per_strip < 16 ? 16 : rows_per_strip)+1)/16); - TIFFGetField(tiff,TIFFTAG_IMAGELENGTH,&rows); + (void) TIFFGetField(tiff,TIFFTAG_IMAGELENGTH,&rows); if (rows_per_strip > rows) rows_per_strip=rows; option=GetImageOption(image_info,"tiff:rows-per-strip"); diff --git a/coders/webp.c b/coders/webp.c index e2f7267058..58a438c790 100644 --- a/coders/webp.c +++ b/coders/webp.c @@ -867,12 +867,15 @@ static MagickBooleanType WriteAnimatedWEBPImage(const ImageInfo *image_info, WebPPicture picture; + image=CoalesceImages(image, exception); + if (image == (Image *) NULL) + return(MagickFalse); + first_image=image; + WebPAnimEncoderOptionsInit(&enc_options); if (image_info->verbose) enc_options.verbose = 1; - image=CoalesceImages(image, exception); - first_image=image; enc=WebPAnimEncoderNew((int) image->page.width,(int) image->page.height, &enc_options); diff --git a/magick/attribute.c b/magick/attribute.c index 84e7321c7c..13c859f0fd 100644 --- a/magick/attribute.c +++ b/magick/attribute.c @@ -197,6 +197,8 @@ static double GetEdgeBackgroundFactor(const Image *image, break; } } + if (p == (const PixelPacket *) NULL) + return(0.0); GetMagickPixelPacket(image,&background); SetMagickPixelPacket(image,p,(IndexPacket *) NULL,&background); artifact=GetImageArtifact(image,"background"); diff --git a/magick/cache.c b/magick/cache.c index fd0e1d9ca7..5f8e1a1bd3 100644 --- a/magick/cache.c +++ b/magick/cache.c @@ -763,6 +763,7 @@ MagickExport void ClonePixelCacheMethods(Cache clone,const Cache cache) % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % +% % ClonePixelCacheRepository() clones the source pixel cache to the destination % cache. % @@ -4310,7 +4311,9 @@ MagickExport MagickBooleanType PersistPixelCache(Image *image, clone_info->length=cache_info->length; clone_info->channels=cache_info->channels; clone_info->offset=(*offset); - status=ClonePixelCacheRepository(clone_info,cache_info,exception); + status=OpenPixelCacheOnDisk(clone_info,WriteMode); + if (status != MagickFalse) + status=ClonePixelCacheRepository(clone_info,cache_info,exception); *offset+=cache_info->length+page_size-(cache_info->length % page_size); clone_info=(CacheInfo *) DestroyPixelCache(clone_info); return(status); diff --git a/magick/geometry.c b/magick/geometry.c index f1a389f4d4..f29ffa6cf2 100644 --- a/magick/geometry.c +++ b/magick/geometry.c @@ -170,6 +170,8 @@ MagickExport MagickStatusType GetGeometry(const char *geometry,ssize_t *x, { if (*(p+1) == ')') return(flags); + (void) CopyMagickString(p,p+1,MaxTextExtent); + break; } case ')': { diff --git a/magick/statistic.c b/magick/statistic.c index f40909aae0..06dc43409b 100644 --- a/magick/statistic.c +++ b/magick/statistic.c @@ -364,12 +364,8 @@ static MagickRealType ApplyEvaluateOperator(RandomInfo *random_info, } case PowEvaluateOperator: { - if (pixel < 0) - result=(MagickRealType) -(QuantumRange*pow((double) -(QuantumScale* - pixel),(double) value)); - else - result=(MagickRealType) (QuantumRange*pow((double) (QuantumScale*pixel), - (double) value)); + result=(MagickRealType) (QuantumRange*pow((double) (QuantumScale*pixel), + (double) value)); break; } case RightShiftEvaluateOperator: