diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 8b2fb21704f..383527990dd 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +2009-05-07 Francois-Xavier Coudert + + PR fortran/22423 + * io/transfer.c (read_block_direct): Avoid warning. + * runtime/string.c (compare0): Avoid warning. + 2009-04-30 Janne Blomqvist PR libfortran/39667 @@ -32,25 +38,25 @@ 2009-04-15 Danny Smith - * io/write.c (itoa) : Rename back to gfc_itoa. - (write_i): Adjust call to write_decimal. - (write_integer): Use gfc_itoa. + * io/write.c (itoa) : Rename back to gfc_itoa. + (write_i): Adjust call to write_decimal. + (write_integer): Use gfc_itoa. 2009-04-10 Janne Blomqvist - * io/io.h (move_pos_offset): Remove prototype. - * io/transfer.c (formatted_transfer_scalar_read): Use sseek - instead of move_pos_offset. - * io/unix.c (move_pos_offset): Remove. + * io/io.h (move_pos_offset): Remove prototype. + * io/transfer.c (formatted_transfer_scalar_read): Use sseek + instead of move_pos_offset. + * io/unix.c (move_pos_offset): Remove. 2009-04-10 Janne Blomqvist PR libfortran/39665 libfortran/39702 libfortran/39709 * io/io.h (st_parameter_dt): Revert aligned attribute from u.p.value. - * io/list_read.c (read_complex): Read directly into user pointer. - (read_real): Likewise. - (list_formatted_read_scalar): Update read_complex and read_real calls. - (nml_read_obj): Read directly into user pointer. + * io/list_read.c (read_complex): Read directly into user pointer. + (read_real): Likewise. + (list_formatted_read_scalar): Update read_complex and read_real calls. + (nml_read_obj): Read directly into user pointer. 2009-04-09 Janne Blomqvist @@ -686,43 +692,43 @@ 2009-04-08 Janne Blomqvist - * io/open.c (already_open): Test for POSIX close return value. - * io/unit.c (close_unit_1): Likewise. - * io/unix.c (raw_close): Return 0 for success for preconnected units. + * io/open.c (already_open): Test for POSIX close return value. + * io/unit.c (close_unit_1): Likewise. + * io/unix.c (raw_close): Return 0 for success for preconnected units. 2009-04-08 Janne Blomqvist - * runtime/string.c (compare0): Use gfc_charlen_type. - * runtime/error.c (gfc_itoa): Move to io/write.c - (xtoa): Rename to gfc_xtoa. - * runtime/backtrace.c (show_backtrace): Call gfc_xtoa. - * intrinsics/cshift0.c (cshift0): Use index_type for shift arg. - * intrinsics/date_and_time.c (date_and_time): Use index_type. - (itime_i4): Likewise. - (itime_i8): Likewise. - (idate_i4): Likewise. - (idate_i8): Likewise. - (gmtime_i4): Likewise. - (gmtime_i8): Likewise. - (ltime_i4): Likewise. - (ltime_i8): Likewise. - * libgfortran.h (gfc_itoa): Remove prototype. - (xtoa): Rename prototype to gfc_xtoa. - * io/list_read.c (nml_read_obj): Use size_t for string length. - * io/transfer.c (read_block_direct): Change nbytes arg from - pointer to value. - (unformatted_read): Minor cleanup, call read_block_directly properly. - (skip_record): Use ssize_t. - (next_record_w_unf): Avoid stell() call by calling sseek with SEEK_CUR. - (iolength_transfer): Make sure to multiply before cast. - * io/intrinsics.c (fgetc): Remove unnecessary variable. - * io/format.c (format_hash): Use gfc_charlen_type. - * io/write.c (itoa): Move from runtime/error.c:gfc_itoa, rename, - make static. - (write_i): Call with pointer to itoa. - (write_z): Call with pointer to gfc_xtoa. - (write_integer): Pointer to itoa. - (nml_write_obj): Type cleanup, don't call strlen in loop. + * runtime/string.c (compare0): Use gfc_charlen_type. + * runtime/error.c (gfc_itoa): Move to io/write.c + (xtoa): Rename to gfc_xtoa. + * runtime/backtrace.c (show_backtrace): Call gfc_xtoa. + * intrinsics/cshift0.c (cshift0): Use index_type for shift arg. + * intrinsics/date_and_time.c (date_and_time): Use index_type. + (itime_i4): Likewise. + (itime_i8): Likewise. + (idate_i4): Likewise. + (idate_i8): Likewise. + (gmtime_i4): Likewise. + (gmtime_i8): Likewise. + (ltime_i4): Likewise. + (ltime_i8): Likewise. + * libgfortran.h (gfc_itoa): Remove prototype. + (xtoa): Rename prototype to gfc_xtoa. + * io/list_read.c (nml_read_obj): Use size_t for string length. + * io/transfer.c (read_block_direct): Change nbytes arg from + pointer to value. + (unformatted_read): Minor cleanup, call read_block_directly properly. + (skip_record): Use ssize_t. + (next_record_w_unf): Avoid stell() call by calling sseek with SEEK_CUR. + (iolength_transfer): Make sure to multiply before cast. + * io/intrinsics.c (fgetc): Remove unnecessary variable. + * io/format.c (format_hash): Use gfc_charlen_type. + * io/write.c (itoa): Move from runtime/error.c:gfc_itoa, rename, + make static. + (write_i): Call with pointer to itoa. + (write_z): Call with pointer to gfc_xtoa. + (write_integer): Pointer to itoa. + (nml_write_obj): Type cleanup, don't call strlen in loop. 2009-04-06 H.J. Lu diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c index 27ae8994918..ea1ef7a44bf 100644 --- a/libgfortran/io/transfer.c +++ b/libgfortran/io/transfer.c @@ -465,7 +465,7 @@ read_block_direct (st_parameter_dt *dtp, void *buf, size_t nbytes) /* Check whether we exceed the total record length. */ if (dtp->u.p.current_unit->flags.has_recl - && (nbytes > dtp->u.p.current_unit->bytes_left)) + && ((gfc_offset) nbytes > dtp->u.p.current_unit->bytes_left)) { to_read_record = dtp->u.p.current_unit->bytes_left; short_record = 1; diff --git a/libgfortran/runtime/string.c b/libgfortran/runtime/string.c index 5a81bd6d950..a102c3bd49a 100644 --- a/libgfortran/runtime/string.c +++ b/libgfortran/runtime/string.c @@ -36,7 +36,10 @@ compare0 (const char *s1, gfc_charlen_type s1_len, const char *s2) /* Strip trailing blanks from the Fortran string. */ len = fstrlen (s1, s1_len); - if (len != strlen(s2)) return 0; /* don't match */ + + if ((size_t) len != strlen(s2)) + return 0; /* don't match */ + return strncasecmp (s1, s2, len) == 0; }