mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-04-25 11:33:42 +03:00
Merge pull request #4551 from radarhere/warnings
Fixed comparison warnings
This commit is contained in:
commit
8e63260d44
|
@ -110,7 +110,7 @@ typedef struct {
|
||||||
|
|
||||||
int extra_offset;
|
int extra_offset;
|
||||||
|
|
||||||
int rawExifLen; /* EXIF data length */
|
size_t rawExifLen; /* EXIF data length */
|
||||||
char* rawExif; /* EXIF buffer pointer */
|
char* rawExif; /* EXIF buffer pointer */
|
||||||
|
|
||||||
} JPEGENCODERSTATE;
|
} JPEGENCODERSTATE;
|
||||||
|
|
|
@ -50,7 +50,7 @@ static OPJ_SIZE_T
|
||||||
j2k_write(void *p_buffer, OPJ_SIZE_T p_nb_bytes, void *p_user_data)
|
j2k_write(void *p_buffer, OPJ_SIZE_T p_nb_bytes, void *p_user_data)
|
||||||
{
|
{
|
||||||
ImagingCodecState state = (ImagingCodecState)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);
|
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;
|
Py_ssize_t n;
|
||||||
float *pq;
|
float *pq;
|
||||||
|
|
||||||
if (len) {
|
if (len > 0) {
|
||||||
if (len > sizeof(params.tcp_rates) / sizeof(params.tcp_rates[0])) {
|
if ((unsigned)len > sizeof(params.tcp_rates) / sizeof(params.tcp_rates[0])) {
|
||||||
len = sizeof(params.tcp_rates)/sizeof(params.tcp_rates[0]);
|
len = sizeof(params.tcp_rates)/sizeof(params.tcp_rates[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,8 +20,8 @@
|
||||||
int
|
int
|
||||||
quantize_pngquant(
|
quantize_pngquant(
|
||||||
Pixel *pixelData,
|
Pixel *pixelData,
|
||||||
int width,
|
unsigned int width,
|
||||||
int height,
|
unsigned int height,
|
||||||
uint32_t quantPixels,
|
uint32_t quantPixels,
|
||||||
Pixel **palette,
|
Pixel **palette,
|
||||||
uint32_t *paletteLength,
|
uint32_t *paletteLength,
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
#include "QuantTypes.h"
|
#include "QuantTypes.h"
|
||||||
|
|
||||||
int quantize_pngquant(Pixel *,
|
int quantize_pngquant(Pixel *,
|
||||||
int,
|
unsigned int,
|
||||||
int,
|
unsigned int,
|
||||||
uint32_t,
|
uint32_t,
|
||||||
Pixel **,
|
Pixel **,
|
||||||
uint32_t *,
|
uint32_t *,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user