windows build with msvc2022
[andemo] / libs / imago / src / filetga.c
index d5d9fe8..f34c9ea 100644 (file)
@@ -138,7 +138,7 @@ static int read_tga(struct img_pixmap *img, struct img_io *io)
        if(hdr.cmap_type == 1) {
                cmap.ncolors = hdr.cmap_len;
 
-               for(i=0; i<hdr.cmap_len; i++) {
+               for(i=0; i<(int)hdr.cmap_len; i++) {
                        switch(hdr.cmap_entry_sz) {
                        case 16:
                                c = img_read_int16_le(io);
@@ -190,13 +190,13 @@ static int read_tga(struct img_pixmap *img, struct img_io *io)
                return -1;
        }
 
-       for(i=0; i<y; i++) {
+       for(i=0; i<(int)y; i++) {
                unsigned char *ptr;
                int j, k;
 
                ptr = (unsigned char*)img->pixels + ((hdr.img_desc & 0x20) ? i : y - (i + 1)) * x * pixel_bytes;
 
-               for(j=0; j<x; j++) {
+               for(j=0; j<(int)x; j++) {
                        /* if the image is raw, then just read the next pixel */
                        if(!IS_RLE(hdr.img_type)) {
                                if(read_pixel(io, fmt, ptr) == -1) {