Skip to content

Commit

Permalink
use ptrdiff_t
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Nov 11, 2024
1 parent 2f31b22 commit 31b5121
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion coders/clipboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ static Image *ReadCLIPBOARDImage(const ImageInfo *image_info,
offset+=12;
}
offset+=BMP_HEADER_SIZE;
p-=BMP_HEADER_SIZE;
p-=(ptrdiff_t)BMP_HEADER_SIZE;
p[0]='B';
p[1]='M';
p[2]=(unsigned char) total_size;
Expand Down
2 changes: 1 addition & 1 deletion coders/sgi.c
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,7 @@ static size_t SGIEncode(unsigned char *pixels,size_t length,
p+=(ptrdiff_t) 8;
while ((p < limit) && ((*(p-8) != *(p-4)) || (*(p-4) != *p)))
p+=(ptrdiff_t) 4;
p-=8;
p-=(ptrdiff_t)8;
length=(size_t) (p-mark) >> 2;
while (length != 0)
{
Expand Down
2 changes: 1 addition & 1 deletion magick/composite.c
Original file line number Diff line number Diff line change
Expand Up @@ -2332,7 +2332,7 @@ MagickExport MagickBooleanType CompositeImageChannel(Image *image,
}
pixels=p;
if (x_offset < 0)
p-=x_offset;
p-=(ptrdiff_t)x_offset;
}
q=GetCacheViewAuthenticPixels(image_view,0,y,image->columns,1,exception);
if (q == (PixelPacket *) NULL)
Expand Down
2 changes: 1 addition & 1 deletion magick/compress.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ MagickExport void Ascii85Encode(Image *image,const unsigned char code)
p+=(ptrdiff_t) 8;
}
image->ascii85->offset=n;
p-=4;
p-=(ptrdiff_t)4;
for (n=0; n < 4; n++)
image->ascii85->buffer[n]=(*p++);
}
Expand Down

0 comments on commit 31b5121

Please sign in to comment.