Eliminate compiler warnings

This commit is contained in:
Cristy
2019-05-12 12:13:48 -04:00
parent c805401957
commit 784105bcbb
7 changed files with 13 additions and 16 deletions
+3 -4
View File
@@ -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);
+1 -1
View File
@@ -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;
+2 -2
View File
@@ -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);
+1 -1
View File
@@ -918,7 +918,7 @@ static MagickBooleanType GetEXIFProperty(const Image *image,
tag;
const char
description[35];
description[36];
} TagInfo;
static const TagInfo
+2 -4
View File
@@ -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;
}
}
+1 -1
View File
@@ -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)
{
+3 -3
View File
@@ -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))