From: Cristy <urban-warrior@imagemagick.org> Date: Fri, 21 Jul 2017 13:24:45 +0000 (-0400) Subject: Eliminate compile warnings X-Git-Tag: 7.0.6-2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9b97a9b7424e052b7bb99aa567339a986e6cdf6b;p=imagemagick Eliminate compile warnings --- diff --git a/MagickCore/attribute.c b/MagickCore/attribute.c index 1d822b82e..d6d8841e6 100644 --- a/MagickCore/attribute.c +++ b/MagickCore/attribute.c @@ -330,15 +330,15 @@ MagickExport size_t GetImageDepth(const Image *image,ExceptionInfo *exception) range=GetQuantumRange(current_depth[id]); if ((atDepth != MagickFalse) && (GetPixelRedTraits(image) & UpdatePixelTrait) != 0) - if (IsPixelAtDepth(image->colormap[i].red,range) == MagickFalse) + if (IsPixelAtDepth(ClampToQuantum(image->colormap[i].red),range) == MagickFalse) atDepth=MagickFalse; if ((atDepth != MagickFalse) && (GetPixelGreenTraits(image) & UpdatePixelTrait) != 0) - if (IsPixelAtDepth(image->colormap[i].green,range) == MagickFalse) + if (IsPixelAtDepth(ClampToQuantum(image->colormap[i].green),range) == MagickFalse) atDepth=MagickFalse; if ((atDepth != MagickFalse) && (GetPixelBlueTraits(image) & UpdatePixelTrait) != 0) - if (IsPixelAtDepth(image->colormap[i].blue,range) == MagickFalse) + if (IsPixelAtDepth(ClampToQuantum(image->colormap[i].blue),range) == MagickFalse) atDepth=MagickFalse; if ((atDepth != MagickFalse)) break; @@ -354,7 +354,7 @@ MagickExport size_t GetImageDepth(const Image *image,ExceptionInfo *exception) } image_view=AcquireVirtualCacheView(image,exception); #if !defined(MAGICKCORE_HDRI_SUPPORT) - if (QuantumRange <= MaxMap) + if ((1UL*QuantumRange) <= MaxMap) { size_t *depth_map; @@ -1052,7 +1052,7 @@ MagickExport MagickBooleanType SetImageDepth(Image *image, status=MagickTrue; image_view=AcquireAuthenticCacheView(image,exception); #if !defined(MAGICKCORE_HDRI_SUPPORT) - if (QuantumRange <= MaxMap) + if ((1UL*QuantumRange) <= MaxMap) { Quantum *depth_map; @@ -1177,7 +1177,8 @@ MagickExport MagickBooleanType SetImageDepth(Image *image, if ((traits == UndefinedPixelTrait) || (channel == IndexPixelChannel) || (channel == ReadMaskPixelChannel)) continue; - q[i]=ScaleAnyToQuantum(ScaleQuantumToAny(ClampPixel(q[i]),range),range); + q[i]=ScaleAnyToQuantum(ScaleQuantumToAny(ClampPixel((MagickRealType) + q[i]),range),range); } q+=GetPixelChannels(image); } diff --git a/MagickCore/threshold.c b/MagickCore/threshold.c index 108bfeb08..9436b31b8 100644 --- a/MagickCore/threshold.c +++ b/MagickCore/threshold.c @@ -361,7 +361,7 @@ MagickExport Image *AdaptiveThresholdImage(const Image *image, % % % % % % -% A u t o T h r e s o l d I m a g e % +% A u t o T h r e s h o l d I m a g e % % % % % % % @@ -474,7 +474,7 @@ static double KapurThreshold(const Image *image,const double *histogram, if ((black_entropy[j]+white_entropy[j]) > maximum_entropy) { maximum_entropy=black_entropy[j]+white_entropy[j]; - threshold=(ssize_t) j; + threshold=(size_t) j; } /* Free resources.