Fixed comparison warnings

This commit is contained in:
Andrew Murray 2020-05-14 06:57:15 +10:00
parent 4634eafe3c
commit 228301373f
4 changed files with 8 additions and 8 deletions

View File

@ -110,7 +110,7 @@ typedef struct {
int extra_offset;
int rawExifLen; /* EXIF data length */
size_t rawExifLen; /* EXIF data length */
char* rawExif; /* EXIF buffer pointer */
} JPEGENCODERSTATE;

View File

@ -50,7 +50,7 @@ static OPJ_SIZE_T
j2k_write(void *p_buffer, OPJ_SIZE_T p_nb_bytes, void *p_user_data)
{
ImagingCodecState state = (ImagingCodecState)p_user_data;
int result;
unsigned int result;
result = _imaging_write_pyFd(state->fd, p_buffer, p_nb_bytes);
@ -399,8 +399,8 @@ j2k_encode_entry(Imaging im, ImagingCodecState state)
Py_ssize_t n;
float *pq;
if (len) {
if (len > sizeof(params.tcp_rates) / sizeof(params.tcp_rates[0])) {
if (len > 0) {
if ((unsigned)len > sizeof(params.tcp_rates) / sizeof(params.tcp_rates[0])) {
len = sizeof(params.tcp_rates)/sizeof(params.tcp_rates[0]);
}

View File

@ -20,8 +20,8 @@
int
quantize_pngquant(
Pixel *pixelData,
int width,
int height,
unsigned int width,
unsigned int height,
uint32_t quantPixels,
Pixel **palette,
uint32_t *paletteLength,

View File

@ -4,8 +4,8 @@
#include "QuantTypes.h"
int quantize_pngquant(Pixel *,
int,
int,
unsigned int,
unsigned int,
uint32_t,
Pixel **,
uint32_t *,