From 7c7050a08d93455f7e62cc75d84d38bcca360f02 Mon Sep 17 00:00:00 2001 From: Cristy Date: Sat, 30 Sep 2017 12:12:21 -0400 Subject: [PATCH] ... --- MagickCore/blob.c | 8 ++++---- MagickCore/memory-private.h | 2 +- MagickCore/segment.c | 1 + coders/json.c | 8 ++++---- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/MagickCore/blob.c b/MagickCore/blob.c index ef09452a6..a76669e13 100644 --- a/MagickCore/blob.c +++ b/MagickCore/blob.c @@ -3409,8 +3409,8 @@ MagickExport ssize_t ReadBlob(Image *image,const size_t length,void *data) break; } p=image->blob->data+image->blob->offset; - count=(ssize_t) MagickMin((MagickOffsetType) length,image->blob->length- - image->blob->offset); + count=(ssize_t) MagickMin((MagickOffsetType) length,(MagickOffsetType) + image->blob->length-image->blob->offset); image->blob->offset+=count; if (count != (ssize_t) length) image->blob->eof=MagickTrue; @@ -4259,8 +4259,8 @@ MagickExport const void *ReadBlobStream(Image *image,const size_t length, return(data); } data=image->blob->data+image->blob->offset; - *count=(ssize_t) MagickMin((MagickOffsetType) length,image->blob->length- - image->blob->offset); + *count=(ssize_t) MagickMin((MagickOffsetType) length,(MagickOffsetType) + image->blob->length-image->blob->offset); image->blob->offset+=(*count); if (*count != (ssize_t) length) image->blob->eof=MagickTrue; diff --git a/MagickCore/memory-private.h b/MagickCore/memory-private.h index bea3d6d77..c22f2ed5c 100644 --- a/MagickCore/memory-private.h +++ b/MagickCore/memory-private.h @@ -22,7 +22,7 @@ extern "C" { #endif -#include "MagickCore/exception.h" +#include "MagickCore/exception-private.h" #if defined(__powerpc__) # define CACHE_LINE_SIZE 128 diff --git a/MagickCore/segment.c b/MagickCore/segment.c index 2287d18b5..8a4c66ca0 100644 --- a/MagickCore/segment.c +++ b/MagickCore/segment.c @@ -93,6 +93,7 @@ #include "MagickCore/image.h" #include "MagickCore/image-private.h" #include "MagickCore/memory_.h" +#include "MagickCore/memory-private.h" #include "MagickCore/monitor.h" #include "MagickCore/monitor-private.h" #include "MagickCore/pixel-accessor.h" diff --git a/coders/json.c b/coders/json.c index df380b7dd..5fdb32c24 100644 --- a/coders/json.c +++ b/coders/json.c @@ -741,7 +741,7 @@ static void EncodeIptcProfile(FILE *file,const StringInfo *profile) dataset=GetStringInfoDatum(profile)[i++]; record=GetStringInfoDatum(profile)[i++]; value=(IptcValue *) NULL; - for (j=0; j < count; j++) + for (j=0; j < (ssize_t) count; j++) { if ((values[j]->record == record) && (values[j]->dataset == dataset)) value=values[j]; @@ -752,7 +752,7 @@ static void EncodeIptcProfile(FILE *file,const StringInfo *profile) sizeof(*values)); if (values == (IptcValue **) NULL) break; - value=AcquireMagickMemory(sizeof(*value)); + value=(IptcValue *) AcquireMagickMemory(sizeof(*value)); if (value == (IptcValue *) NULL) break; /* Check the tag length in IptcValue when a new tag is added */ @@ -845,7 +845,7 @@ static void EncodeIptcProfile(FILE *file,const StringInfo *profile) } if (values != (IptcValue **) NULL) { - for (i=0; i < count; i++) + for (i=0; i < (ssize_t) count; i++) { value=values[i]; (void) FormatLocaleFile(file," \"%s[%.20g,%.20g]\": ", @@ -855,7 +855,7 @@ static void EncodeIptcProfile(FILE *file,const StringInfo *profile) else { (void) FormatLocaleFile(file,"["); - for (j=0; j < value->values_length; j++) + for (j=0; j < (ssize_t) value->values_length; j++) { for (k=0; value->values[j][k] != (char *) NULL; k++) { -- 2.40.0