Changeset 3451 for libcaca


Ignore:
Timestamp:
May 14, 2009, 10:43:52 AM (11 years ago)
Author:
Sam Hocevar
Message:

Fix a few implicit cast related warnings on VC++.

Location:
libcaca/trunk/caca/codec
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/caca/codec/export.c

    r3284 r3451  
    11261126                case '<': cur += sprintf(cur, "&lt;"); break;
    11271127                case '&': cur += sprintf(cur, "&amp;"); break;
    1128                 default: *cur++ = ch; break;
     1128                default: *cur++ = (uint8_t)ch; break;
    11291129            }
    11301130            cur += sprintf(cur, "</text>\n");
  • libcaca/trunk/caca/codec/import.c

    r3427 r3451  
    161161    caca_file_t *f;
    162162    char *data = NULL;
    163     ssize_t size = 0;
    164     int ret;
     163    ssize_t ret, size = 0;
    165164
    166165    f = caca_file_open(filename, "rb");
     
    178177        }
    179178
    180         ret = caca_file_read(f, data + size, 1024);
     179        ret = (ssize_t)caca_file_read(f, data + size, 1024);
    181180        if(ret >= 0)
    182181            size += ret;
     
    331330    caca_set_frame(cv, 0);
    332331
    333     return 4 + control_size + data_size;
     332    return (ssize_t)(4 + control_size + data_size);
    334333
    335334invalid_caca:
     
    377376        caca_set_canvas_size(cv, width, height = y);
    378377
    379     return size;
     378    return (ssize_t)size;
    380379}
    381380
     
    712711            }
    713712            wch = caca_utf32_is_fullwidth(ch) ? 2 : 1;
    714             skip += bytes - 1;
     713            skip += (int)(bytes - 1);
    715714        }
    716715        else
Note: See TracChangeset for help on using the changeset viewer.