From: cristy Date: Sun, 5 Jan 2014 20:51:47 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~2964 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a230a61354e4f37467fad5dbc04d16c095a5b957;p=imagemagick --- diff --git a/coders/dpx.c b/coders/dpx.c index b0600daa1..5532e13cf 100644 --- a/coders/dpx.c +++ b/coders/dpx.c @@ -718,7 +718,7 @@ static Image *ReadDPXImage(const ImageInfo *image_info,ExceptionInfo *exception) offset+=4; dpx.file.ditto_key=ReadBlobLong(image); offset+=4; - if (dpx.file.ditto_key != ~0UL) + if (dpx.file.ditto_key != ~0U) (void) FormatImageProperty(image,"dpx:file.ditto.key","%u", dpx.file.ditto_key); dpx.file.generic_size=ReadBlobLong(image); @@ -764,7 +764,7 @@ static Image *ReadDPXImage(const ImageInfo *image_info,ExceptionInfo *exception) } dpx.file.encrypt_key=ReadBlobLong(image); offset+=4; - if (dpx.file.encrypt_key != ~0UL) + if (dpx.file.encrypt_key != ~0U) (void) FormatImageProperty(image,"dpx:file.encrypt_key","%u", dpx.file.encrypt_key); offset+=ReadBlob(image,sizeof(dpx.file.reserve),(unsigned char *) @@ -849,12 +849,12 @@ static Image *ReadDPXImage(const ImageInfo *image_info,ExceptionInfo *exception) */ dpx.orientation.x_offset=ReadBlobLong(image); offset+=4; - if (dpx.orientation.x_offset != ~0UL) + if (dpx.orientation.x_offset != ~0U) (void) FormatImageProperty(image,"dpx:orientation.x_offset","%u", dpx.orientation.x_offset); dpx.orientation.y_offset=ReadBlobLong(image); offset+=4; - if (dpx.orientation.y_offset != ~0UL) + if (dpx.orientation.y_offset != ~0U) (void) FormatImageProperty(image,"dpx:orientation.y_offset","%u", dpx.orientation.y_offset); dpx.orientation.x_center=ReadBlobFloat(image); @@ -869,12 +869,12 @@ static Image *ReadDPXImage(const ImageInfo *image_info,ExceptionInfo *exception) dpx.orientation.y_center); dpx.orientation.x_size=ReadBlobLong(image); offset+=4; - if (dpx.orientation.x_size != ~0UL) + if (dpx.orientation.x_size != ~0U) (void) FormatImageProperty(image,"dpx:orientation.x_size","%u", dpx.orientation.x_size); dpx.orientation.y_size=ReadBlobLong(image); offset+=4; - if (dpx.orientation.y_size != ~0UL) + if (dpx.orientation.y_size != ~0U) (void) FormatImageProperty(image,"dpx:orientation.y_size","%u", dpx.orientation.y_size); offset+=ReadBlob(image,sizeof(dpx.orientation.filename),(unsigned char *) @@ -912,8 +912,8 @@ static Image *ReadDPXImage(const ImageInfo *image_info,ExceptionInfo *exception) dpx.orientation.aspect_ratio[i]=ReadBlobLong(image); offset+=4; } - if ((dpx.orientation.aspect_ratio[0] != ~0UL) && - (dpx.orientation.aspect_ratio[1] != ~0UL)) + if ((dpx.orientation.aspect_ratio[0] != ~0U) && + (dpx.orientation.aspect_ratio[1] != ~0U)) (void) FormatImageProperty(image,"dpx:orientation.aspect_ratio", "%ux%u",dpx.orientation.aspect_ratio[0], dpx.orientation.aspect_ratio[1]); @@ -954,17 +954,17 @@ static Image *ReadDPXImage(const ImageInfo *image_info,ExceptionInfo *exception) dpx.film.format); dpx.film.frame_position=ReadBlobLong(image); offset+=4; - if (dpx.film.frame_position != ~0UL) + if (dpx.film.frame_position != ~0U) (void) FormatImageProperty(image,"dpx:film.frame_position","%u", dpx.film.frame_position); dpx.film.sequence_extent=ReadBlobLong(image); offset+=4; - if (dpx.film.sequence_extent != ~0UL) + if (dpx.film.sequence_extent != ~0U) (void) FormatImageProperty(image,"dpx:film.sequence_extent","%u", dpx.film.sequence_extent); dpx.film.held_count=ReadBlobLong(image); offset+=4; - if (dpx.film.held_count != ~0UL) + if (dpx.film.held_count != ~0U) (void) FormatImageProperty(image,"dpx:film.held_count","%u", dpx.film.held_count); dpx.film.frame_rate=ReadBlobFloat(image); @@ -1085,7 +1085,7 @@ static Image *ReadDPXImage(const ImageInfo *image_info,ExceptionInfo *exception) offset+=ReadBlob(image,sizeof(dpx.user.id),(unsigned char *) dpx.user.id); if (*dpx.user.id != '\0') (void) FormatImageProperty(image,"dpx:user.id","%.32s",dpx.user.id); - if ((dpx.file.user_size != ~0UL) && + if ((dpx.file.user_size != ~0U) && ((size_t) dpx.file.user_size > sizeof(dpx.user.id))) { StringInfo @@ -1113,7 +1113,7 @@ static Image *ReadDPXImage(const ImageInfo *image_info,ExceptionInfo *exception) /* Convert DPX raster image to pixel packets. */ - if ((dpx.image.image_element[n].data_offset != (unsigned int) (~0UL)) && + if ((dpx.image.image_element[n].data_offset != ~0U) && (dpx.image.image_element[n].data_offset != 0U)) { MagickOffsetType diff --git a/coders/webp.c b/coders/webp.c index 2c7dbda3d..2988372a0 100644 --- a/coders/webp.c +++ b/coders/webp.c @@ -168,7 +168,7 @@ static MagickBooleanType IsWEBPImageLossless(const unsigned char *stream, #define TAG_SIZE 4 #define CHUNK_SIZE_BYTES 4 #define CHUNK_HEADER_SIZE 8 -#define MAX_CHUNK_PAYLOAD (~0UL-CHUNK_HEADER_SIZE-1) +#define MAX_CHUNK_PAYLOAD (~0U-CHUNK_HEADER_SIZE-1) ssize_t offset;