kwo pushed a commit to branch master.

http://git.enlightenment.org/legacy/imlib2_loaders.git/commit/?id=da1b7f5ab2904fe7cd051f168ef51e09aaa924cc

commit da1b7f5ab2904fe7cd051f168ef51e09aaa924cc
Author: Kim Woelders <k...@woelders.dk>
Date:   Tue Feb 14 19:08:55 2017 +0100

    Fix some warnings
---
 src/modules/loaders/loader_ani.c |  2 +-
 src/modules/loaders/loader_ico.c |  3 +--
 src/modules/loaders/loader_xcf.c | 12 ++++--------
 3 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/src/modules/loaders/loader_ani.c b/src/modules/loaders/loader_ani.c
index ea4e69f..a465826 100644
--- a/src/modules/loaders/loader_ani.c
+++ b/src/modules/loaders/loader_ani.c
@@ -66,7 +66,7 @@ typedef struct _MsChunk
   struct _MsChunk     *next;
   DATA32       chunk_id;
   DATA32       chunk_size;  /* Size of this chunk, starting from */
-  char         data;        /* the following byte. Thus chunk_size = full size 
- 8 */
+  DATA8        data;        /* the following byte. Thus chunk_size = full size 
- 8 */
 } MsChunk;
 
 typedef struct _MsAni
diff --git a/src/modules/loaders/loader_ico.c b/src/modules/loaders/loader_ico.c
index 3fafce9..67096f5 100644
--- a/src/modules/loaders/loader_ico.c
+++ b/src/modules/loaders/loader_ico.c
@@ -589,9 +589,8 @@ load(ImlibImage *im, ImlibProgressFunction progress, char 
progress_granularity,
   
   if (im->data)
     free(im->data);
-  return 0;
 
-  progress_granularity = 0;
+  return 0;
 }
 
 /* fills the ImlibLoader struct with a strign array of format file */
diff --git a/src/modules/loaders/loader_xcf.c b/src/modules/loaders/loader_xcf.c
index 1653920..12bd72b 100644
--- a/src/modules/loaders/loader_xcf.c
+++ b/src/modules/loaders/loader_xcf.c
@@ -256,7 +256,7 @@ struct _GimpImage
   DATA32              floating_sel_offset;
 
   DATA8*              cmap;            /*  colormap--for indexed        */
-  int                 num_cols;        /*  number of colors in map      */
+  DATA32              num_cols;        /*  number of colors in map      */
 
  /* If a layer number was passed to the loader, it goes here: */
   int                 single_layer_index;
@@ -464,7 +464,7 @@ xcf_load_image_props (void)
          {
            if (image->file_version == 0) 
              {
-               int i;
+               unsigned int i;
                fprintf (stderr,
                         "XCF warning: version 0 of XCF file format\n"
                         "did not save indexed colormaps correctly.\n"
@@ -491,9 +491,9 @@ xcf_load_image_props (void)
 
        case PROP_COMPRESSION:
          {
-           char compression;
+           DATA8 compression;
 
-           image->cp += xcf_read_int8 (image->fp, (char*) &compression, 1);
+           image->cp += xcf_read_int8 (image->fp, &compression, 1);
 
            if ((compression != COMPRESS_NONE) &&
                (compression != COMPRESS_RLE) &&
@@ -1718,10 +1718,6 @@ load(ImlibImage *im, ImlibProgressFunction progress, 
char progress_granularity,
    xcf_cleanup();
 
    return 1;
-
-   /* shut up warnings: */
-   progress_granularity = 0;
-   immediate_load = 0;
 }
 
 /* fills the ImlibLoader struct with a strign array of format file */

-- 


Reply via email to