fix -Wsign-compare
parent
8e4af491aa
commit
7382faef3c
|
@ -109,7 +109,7 @@ int gdGetWord(int *result, gdIOCtx *ctx)
|
|||
|
||||
int gdGetWordLSB(signed short int *result, gdIOCtx *ctx)
|
||||
{
|
||||
unsigned int high = 0, low = 0;
|
||||
int high = 0, low = 0;
|
||||
low = (ctx->getC) (ctx);
|
||||
if (low == EOF) {
|
||||
return 0;
|
||||
|
|
|
@ -302,7 +302,8 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromJpegCtx(gdIOCtx *infile)
|
|||
volatile JSAMPROW row = 0;
|
||||
volatile gdImagePtr im = 0;
|
||||
JSAMPROW rowptr[1];
|
||||
int i, j, retval;
|
||||
JDIMENSION i, j;
|
||||
int retval;
|
||||
JDIMENSION nrows;
|
||||
int channels = 3;
|
||||
int inverted = 0;
|
||||
|
@ -919,7 +920,7 @@ safeboolean empty_output_buffer(j_compress_ptr cinfo)
|
|||
void term_destination(j_compress_ptr cinfo)
|
||||
{
|
||||
my_dest_ptr dest = (my_dest_ptr) cinfo->dest;
|
||||
size_t datacount = OUTPUT_BUF_SIZE - dest->pub.free_in_buffer;
|
||||
int datacount = OUTPUT_BUF_SIZE - dest->pub.free_in_buffer;
|
||||
|
||||
/* Write any data remaining in the buffer */
|
||||
if(datacount > 0) {
|
||||
|
|
|
@ -81,7 +81,7 @@ gdPngReadData (png_structp png_ptr, png_bytep data, png_size_t length)
|
|||
{
|
||||
int check;
|
||||
check = gdGetBuf (data, length, (gdIOCtx *) png_get_io_ptr (png_ptr));
|
||||
if (check != length) {
|
||||
if (check != (int)length) {
|
||||
png_error(png_ptr, "Read Error: truncated data");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -170,7 +170,7 @@ static toff_t tiff_seekproc(thandle_t clientdata, toff_t offset, int from)
|
|||
th->pos = offset;
|
||||
}
|
||||
|
||||
return result ? offset : -1;
|
||||
return result ? offset : (toff_t)-1;
|
||||
}
|
||||
|
||||
/* TIFFCloseProc tiff_closeproc - used to finally close the TIFF file */
|
||||
|
@ -253,7 +253,7 @@ BGD_DECLARE(void) tiffWriter(gdImagePtr image, gdIOCtx *out, int bitDepth)
|
|||
gdImageSetClip(image, 0, 0, width, height);
|
||||
|
||||
/* handle old-style single-colour mapping to 100% transparency */
|
||||
if(image->transparent != 0xffffffff) {
|
||||
if(image->transparent != -1) {
|
||||
/* set our 100% transparent colour value */
|
||||
transparentColorR = gdImageRed(image, image->transparent);
|
||||
transparentColorG = gdImageGreen(image, image->transparent);
|
||||
|
@ -310,7 +310,7 @@ BGD_DECLARE(void) tiffWriter(gdImagePtr image, gdIOCtx *out, int bitDepth)
|
|||
|
||||
/* here, we check if the 'save alpha' flag is set on the source gd image */
|
||||
if( (bitDepth == 24) &&
|
||||
(image->saveAlphaFlag || image->transparent != 0xffffffff)) {
|
||||
(image->saveAlphaFlag || image->transparent != -1)) {
|
||||
/* so, we need to store the alpha values too!
|
||||
* Also, tell TIFF what the extra sample means (associated alpha) */
|
||||
samplesPerPixel = 4;
|
||||
|
@ -357,7 +357,7 @@ BGD_DECLARE(void) tiffWriter(gdImagePtr image, gdIOCtx *out, int bitDepth)
|
|||
scan[(x * samplesPerPixel) + 0] = color;
|
||||
} else {
|
||||
/* write out 24 bit value in 3 (or 4 if transparent) bytes */
|
||||
if(image->saveAlphaFlag || image->transparent != 0xffffffff) {
|
||||
if(image->saveAlphaFlag || image->transparent != -1) {
|
||||
scan[(x * samplesPerPixel) + 3] = a;
|
||||
}
|
||||
|
||||
|
@ -662,8 +662,7 @@ static int createFromTiffLines(TIFF *tif, gdImagePtr im, uint16 bps, uint16 phot
|
|||
char has_alpha, char is_bw, int extra)
|
||||
{
|
||||
uint16 planar;
|
||||
uint32 im_height, im_width;
|
||||
int y;
|
||||
uint32 im_height, im_width, y;
|
||||
|
||||
unsigned char *buffer;
|
||||
|
||||
|
|
|
@ -1528,7 +1528,7 @@ static FcPattern* find_font(FcPattern* pattern)
|
|||
static char* find_postscript_font(FcPattern **fontpattern, char* fontname)
|
||||
{
|
||||
FcPattern* font = NULL;
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
*fontpattern = NULL;
|
||||
for (i = 0; i < sizeof(postscript_alias)/sizeof(*postscript_alias); i++) {
|
||||
|
|
Loading…
Reference in New Issue