diff --git a/libgfortran/io/fbuf.c b/libgfortran/io/fbuf.c index ba6f71011dd..e34fc75f937 100644 --- a/libgfortran/io/fbuf.c +++ b/libgfortran/io/fbuf.c @@ -126,7 +126,7 @@ fbuf_seek (gfc_unit * u, gfc_offset off) if (pos < 0) return -1; u->fbuf->ptr = u->fbuf->buf + pos; - if (pos > u->fbuf->act) + if (pos > (gfc_offset) u->fbuf->act) u->fbuf->act = pos; return 0; } diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c index 8353f3ddb74..ff7e651016e 100644 --- a/libgfortran/io/transfer.c +++ b/libgfortran/io/transfer.c @@ -2290,7 +2290,7 @@ skip_record (st_parameter_dt *dtp, size_t bytes) { rlength = (MAX_READ > (size_t) dtp->u.p.current_unit->bytes_left_subrecord) ? - MAX_READ : dtp->u.p.current_unit->bytes_left_subrecord; + MAX_READ : (size_t) dtp->u.p.current_unit->bytes_left_subrecord; if (sread (dtp->u.p.current_unit->s, p, &rlength) != 0) {