Skip to content

Commit

Permalink
eliminate compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Apr 28, 2024
1 parent a4c84b6 commit b9d4839
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion coders/rle.c
Expand Up @@ -340,7 +340,8 @@ static Image *ReadRLEImage(const ImageInfo *image_info,ExceptionInfo *exception)
*/
number_planes_filled=(number_planes % 2 == 0) ? number_planes :
number_planes+1;
if (((MagickSizeType) number_pixels*number_planes_filled) != (size_t) (number_pixels*number_planes_filled))
if ((number_pixels*number_planes_filled) !=
(MagickSizeType) (((size_t) number_pixels*number_planes_filled)))
ThrowRLEException(ResourceLimitError,"MemoryAllocationFailed");
pixel_info=AcquireVirtualMemory(image->columns,image->rows*
MagickMax(number_planes_filled,4)*sizeof(*pixels));
Expand Down
4 changes: 2 additions & 2 deletions coders/sgi.c
Expand Up @@ -386,8 +386,8 @@ static Image *ReadSGIImage(const ImageInfo *image_info,ExceptionInfo *exception)
*/
bytes_per_pixel=(size_t) iris_info.bytes_per_pixel;
number_pixels=(MagickSizeType) iris_info.columns*iris_info.rows;
if ((4*bytes_per_pixel*number_pixels) != ((MagickSizeType) (size_t)
(4*bytes_per_pixel*number_pixels)))
if ((4*bytes_per_pixel*number_pixels) !=
((MagickSizeType) ((size_t) (4*bytes_per_pixel*number_pixels))))
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
pixel_info=AcquireVirtualMemory(iris_info.columns,iris_info.rows*4*
bytes_per_pixel*sizeof(*pixels));
Expand Down

0 comments on commit b9d4839

Please sign in to comment.