]> granicus.if.org Git - imagemagick/commitdiff
Eliminate compiler warnings
authorCristy <mikayla-grace@urban-warrior.org>
Sun, 12 May 2019 16:13:48 +0000 (12:13 -0400)
committerCristy <mikayla-grace@urban-warrior.org>
Sun, 12 May 2019 16:14:09 +0000 (12:14 -0400)
MagickCore/annotate.c
MagickCore/magick-type.h
MagickCore/nt-base.c
MagickCore/property.c
MagickCore/threshold.c
coders/jpeg.c
coders/mat.c

index 53fe2543afbbfd6fbc55e1204d4e95020ea80318..d7e26c7ed7cf0a4798923fdf0fb6fe7367a37c32 100644 (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);
index d8ed4061d0d14d25809566b76ca989bfba257660..a46cdd71627d9743e7ed23e34cadf29e5a30d9b0 100644 (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;
index 778c41eced3f16e3ccc583598ef5237c271d75f4..67f18537040ae8cee96b88d53f2ed8c5723874c6 100644 (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);
index 8e63df7cb28cd5a2a15ab3a3587bcf1d33843a11..8e6bfa3fc2f9c04ea4b6749c8635549063c09272 100644 (file)
@@ -918,7 +918,7 @@ static MagickBooleanType GetEXIFProperty(const Image *image,
       tag;
 
     const char
-      description[35];
+      description[36];
   } TagInfo;
 
   static const TagInfo
index 4323cf0ab56db611167fd41d75f708a79693dcb4..668f52be0ad1fb8e59cb1ad61a94ce0800099406 100644 (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;
     }
   }
index 164c9399f3ec45d57c24b53cfa9c41e991f28831..99f005e5b2ec8fae9624935fed4fbdb3f69cdd2b 100644 (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)
       {
index e1c4961ae1ab8bc7828d28df42fad0342f21ad98..0c01558cb2b3bdcbfc9439d8ca950f4ed93d70f8 100644 (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))