(((x) & 0xff00 ) >> 8))
#define SPANS_COMMON(x1, w1, x2, w2) \
-(!(( (int)((x2) + (w2)) <= (int)(x1)) || (int)((x2) >= (int)((x1) + (w1)))))
+(!(( (int)((x2) + (int)(w2)) <= (int)(x1)) || (int)((x2) >= (int)((x1) + (int)(w1)))))
#define RECTS_INTERSECT(x, y, w, h, xx, yy, ww, hh) \
((SPANS_COMMON((x), (w), (xx), (ww))) && (SPANS_COMMON((y), (h), (yy), (hh))))
{ \
if ((int)_x < (int)(_cx)) \
{ \
- if ((int)_w + (_x - (int)(_cx)) < 0) _w = 0; \
- else _w += (_x - (int)(_cx)); \
+ if ((int)_w + ((int)_x - (int)(_cx)) < 0) _w = 0; \
+ else _w += ((int)_x - (int)(_cx)); \
_x = (_cx); \
} \
if ((int)(_x + _w) > (int)((_cx) + (_cw))) \
_w = (_cx) + (_cw) - _x; \
if ((int)_y < (int)(_cy)) \
{ \
- if ((int)_h + (_y - (int)(_cy)) < 0) _h = 0; \
- else _h += (_y - (int)(_cy)); \
+ if ((int)_h + ((int)_y - (int)(_cy)) < 0) _h = 0; \
+ else _h += ((int)_y - (int)(_cy)); \
_y = (_cy); \
} \
if ((int)(_y + _h) > (int)((_cy) + (_ch))) \
if (fstat(fd, &ss) < 0) goto close_file;
*error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT;
- if (ss.st_size < (sizeof(tga_header) + sizeof(tga_footer))) goto close_file;
+ if (ss.st_size < (off_t)(sizeof(tga_header) + sizeof(tga_footer)))
+ goto close_file;
seg = mmap(0, ss.st_size, PROT_READ, MAP_SHARED, fd, 0);
if (seg == MAP_FAILED) goto close_file;
filedata = seg;
*error = EVAS_LOAD_ERROR_CORRUPT_FILE;
footer_present = 1;
}
- filedata = (char *)filedata + sizeof(tga_header);
+ filedata = (unsigned char *)filedata + sizeof(tga_header);
vinverted = !(header->descriptor & TGA_DESC_VERTICAL);
switch (header->imageType)
{
if (fstat(fd, &ss) < 0) goto close_file;
*error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT;
- if (ss.st_size < (sizeof(tga_header) + sizeof(tga_footer))) goto close_file;
+ if (ss.st_size < (off_t)(sizeof(tga_header) + sizeof(tga_footer)))
+ goto close_file;
seg = mmap(0, ss.st_size, PROT_READ, MAP_SHARED, fd, 0);
if (seg == MAP_FAILED) goto close_file;
filedata = seg;
*error = EVAS_LOAD_ERROR_CORRUPT_FILE;
footer_present = 1;
}
- filedata = (char *)filedata + sizeof(tga_header);
+ filedata = (unsigned char *)filedata + sizeof(tga_header);
vinverted = !(header->descriptor & TGA_DESC_VERTICAL);
switch (header->imageType)
{
IMG_TOO_BIG(w, h))
goto close_file;
- if ((w != ie->w) || (h != ie->h))
+ if ((w != (int)ie->w) || (h != (int)ie->h))
{
*error = EVAS_LOAD_ERROR_GENERIC;
goto close_file;
}
static void
-module_close(Evas_Module *em)
+module_close(Evas_Module *em __UNUSED__)
{
}