warnings--
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 19 Sep 2010 02:43:08 +0000 (02:43 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 19 Sep 2010 02:43:08 +0000 (02:43 +0000)
warnings = 0.

git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@52449 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/include/evas_macros.h
src/modules/loaders/bmp/evas_image_load_bmp.c
src/modules/loaders/jpeg/evas_image_load_jpeg.c
src/modules/loaders/tga/evas_image_load_tga.c

index 58edaa5..ed29dbd 100644 (file)
@@ -24,7 +24,7 @@
     (((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)))      \
index 92a3609..387f317 100644 (file)
@@ -535,7 +535,7 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key
        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;
index 7f3ade1..1213de2 100644 (file)
@@ -174,7 +174,6 @@ evas_image_load_file_head_jpeg_internal(Image_Entry *ie, FILE *f, int *error)
    if (ie->scale > 1)
      {
        jpeg_destroy_decompress(&cinfo);
-
        rewind(f);
        jpeg_create_decompress(&cinfo);
        jpeg_stdio_src(&cinfo, f);
index 30c1597..703366c 100644 (file)
@@ -88,7 +88,8 @@ evas_image_load_file_head_tga(Image_Entry *ie, const char *file, const char *key
    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;
@@ -103,7 +104,7 @@ evas_image_load_file_head_tga(Image_Entry *ie, const char *file, const char *key
         *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)
      {
@@ -165,7 +166,8 @@ evas_image_load_file_data_tga(Image_Entry *ie, const char *file, const char *key
    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;
@@ -180,7 +182,7 @@ evas_image_load_file_data_tga(Image_Entry *ie, const char *file, const char *key
         *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)
      {
@@ -206,7 +208,7 @@ evas_image_load_file_data_tga(Image_Entry *ie, const char *file, const char *key
        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;
@@ -479,7 +481,7 @@ module_open(Evas_Module *em)
 }
 
 static void
-module_close(Evas_Module *em)
+module_close(Evas_Module *em __UNUSED__)
 {
 }