summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MagickCore/annotate.c7
-rw-r--r--MagickCore/magick-type.h2
-rw-r--r--MagickCore/nt-base.c4
-rw-r--r--MagickCore/property.c2
-rw-r--r--MagickCore/threshold.c6
-rw-r--r--coders/jpeg.c2
-rw-r--r--coders/mat.c6
7 files changed, 13 insertions, 16 deletions
diff --git a/MagickCore/annotate.c b/MagickCore/annotate.c
index 53fe2543a..d7e26c7ed 100644
--- a/MagickCore/annotate.c
+++ b/MagickCore/annotate.c
@@ -1077,7 +1077,7 @@ static size_t ComplexTextLayout(const Image *image,const DrawInfo *draw_info,
raqm_glyph_t
*glyphs;
- register size_t
+ register ssize_t
i;
size_t
@@ -1161,12 +1161,11 @@ cleanup:
ssize_t
last_glyph;
- magick_unreferenced(image);
- magick_unreferenced(exception);
-
/*
Simple layout for bi-directional text (right-to-left or left-to-right).
*/
+ magick_unreferenced(image);
+ magick_unreferenced(exception);
*grapheme=(GraphemeInfo *) AcquireQuantumMemory(length+1,sizeof(**grapheme));
if (*grapheme == (GraphemeInfo *) NULL)
return(0);
diff --git a/MagickCore/magick-type.h b/MagickCore/magick-type.h
index d8ed4061d..a46cdd716 100644
--- a/MagickCore/magick-type.h
+++ b/MagickCore/magick-type.h
@@ -181,7 +181,7 @@ typedef enum
# define IsNaN(a) ((a) != (a))
#endif
#if !defined(INFINITY)
-# define INFINITY (-logf(0f))
+# define INFINITY ((double) -logf(0f))
#endif
typedef struct _BlobInfo BlobInfo;
diff --git a/MagickCore/nt-base.c b/MagickCore/nt-base.c
index 778c41ece..67f185370 100644
--- a/MagickCore/nt-base.c
+++ b/MagickCore/nt-base.c
@@ -1800,7 +1800,7 @@ MagickPrivate DIR *NTOpenDirectory(const char *path)
if (length == 0)
return((DIR *) NULL);
if (wcsncat(file_specification,(const wchar_t*) DirectorySeparator,
- MagickPathExtent-wcslen(file_specification)-1) == (wchar_t*) NULL)
+ MagickPathExtent-wcslen(file_specification)-1) == (wchar_t *) NULL)
return((DIR *) NULL);
entry=(DIR *) AcquireCriticalMemory(sizeof(DIR));
entry->firsttime=TRUE;
@@ -1808,7 +1808,7 @@ MagickPrivate DIR *NTOpenDirectory(const char *path)
if (entry->hSearch == INVALID_HANDLE_VALUE)
{
if(wcsncat(file_specification,L"*.*",
- MagickPathExtent-wcslen(file_specification)-1) == (wchar_t*) NULL)
+ MagickPathExtent-wcslen(file_specification)-1) == (wchar_t *) NULL)
{
entry=(DIR *) RelinquishMagickMemory(entry);
return((DIR *) NULL);
diff --git a/MagickCore/property.c b/MagickCore/property.c
index 8e63df7cb..8e6bfa3fc 100644
--- a/MagickCore/property.c
+++ b/MagickCore/property.c
@@ -918,7 +918,7 @@ static MagickBooleanType GetEXIFProperty(const Image *image,
tag;
const char
- description[35];
+ description[36];
} TagInfo;
static const TagInfo
diff --git a/MagickCore/threshold.c b/MagickCore/threshold.c
index 4323cf0ab..668f52be0 100644
--- a/MagickCore/threshold.c
+++ b/MagickCore/threshold.c
@@ -562,8 +562,7 @@ static double OTSUThreshold(const Image *image,const double *histogram,
return(100.0*threshold/MaxIntensity);
}
-static double TriangleThreshold(const double *histogram,
- ExceptionInfo *exception)
+static double TriangleThreshold(const double *histogram)
{
double
a,
@@ -591,7 +590,6 @@ static double TriangleThreshold(const double *histogram,
/*
Compute optimal threshold with triangle algorithm.
*/
- (void) exception;
start=0; /* find start bin, first bin not zero count */
for (i=0; i <= (ssize_t) MaxIntensity; i++)
if (histogram[i] > 0.0)
@@ -739,7 +737,7 @@ MagickExport MagickBooleanType AutoThresholdImage(Image *image,
}
case TriangleThresholdMethod:
{
- threshold=TriangleThreshold(histogram,exception);
+ threshold=TriangleThreshold(histogram);
break;
}
}
diff --git a/coders/jpeg.c b/coders/jpeg.c
index 164c9399f..99f005e5b 100644
--- a/coders/jpeg.c
+++ b/coders/jpeg.c
@@ -2055,7 +2055,7 @@ static void WriteProfile(j_compress_ptr jpeg_info,Image *image,
id=JPEG_APP0+StringToInteger(name+3);
for (i=0; i < (ssize_t) length; i+=65533L)
jpeg_write_marker(jpeg_info,id,GetStringInfoDatum(profile)+i,
- MagickMin(length-i,65533));
+ (unsigned int) MagickMin(length-i,65533));
}
if (LocaleCompare(name,"EXIF") == 0)
{
diff --git a/coders/mat.c b/coders/mat.c
index e1c4961ae..0c01558cb 100644
--- a/coders/mat.c
+++ b/coders/mat.c
@@ -962,10 +962,10 @@ MATLAB_KO:
}
filepos = TellBlob(image);
- while(filepos < GetBlobSize(image) && !EOFBlob(image)) /* object parser loop */
+ while(filepos < (MagickOffsetType) GetBlobSize(image) && !EOFBlob(image)) /* object parser loop */
{
Frames = 1;
- if(filepos > GetBlobSize(image) || filepos < 0)
+ if(filepos > (MagickOffsetType) GetBlobSize(image) || filepos < 0)
break;
if(SeekBlob(image,filepos,SEEK_SET) != filepos) break;
/* printf("pos=%X\n",TellBlob(image)); */
@@ -1283,7 +1283,7 @@ RestoreMSCWarning
clone_info=DestroyImageInfo(clone_info);
if (quantum_info != (QuantumInfo *) NULL)
quantum_info=DestroyQuantumInfo(quantum_info);
- BImgBuff=RelinquishMagickMemory(BImgBuff);
+ BImgBuff=(unsigned char *) RelinquishMagickMemory(BImgBuff);
ThrowReaderException(CorruptImageError,"UnexpectedEndOfFile");
}
if((CellType==miINT8 || CellType==miUINT8) && (MATLAB_HDR.StructureFlag & FLAG_LOGICAL))