aboutsummaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>2009-05-07 21:42:22 +0000
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>2009-05-07 21:42:22 +0000
commit743460ea821f749dd56e31a9925d33ae3240566a (patch)
tree1a4bd302a8099d71d2fea0822a85d6d1fb4356c9 /libgfortran
parent45b9b2e927e2f72760f040eb1054a779b17cea63 (diff)
downloadgcc-743460ea821f749dd56e31a9925d33ae3240566a.zip
gcc-743460ea821f749dd56e31a9925d33ae3240566a.tar.gz
gcc-743460ea821f749dd56e31a9925d33ae3240566a.tar.bz2
re PR libfortran/22423 (Warnings when building libgfortran)
PR fortran/22423 * io/transfer.c (read_block_direct): Avoid warning. * runtime/string.c (compare0): Avoid warning. From-SVN: r147254
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/ChangeLog96
-rw-r--r--libgfortran/io/transfer.c2
-rw-r--r--libgfortran/runtime/string.c5
3 files changed, 56 insertions, 47 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 8b2fb21..3835279 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,9 @@
+2009-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ PR fortran/22423
+ * io/transfer.c (read_block_direct): Avoid warning.
+ * runtime/string.c (compare0): Avoid warning.
+
2009-04-30 Janne Blomqvist <jb@gcc.gnu.org>
PR libfortran/39667
@@ -32,25 +38,25 @@
2009-04-15 Danny Smith <dannysmith@clear.net.nz>
- * 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 <jb@gcc.gnu.org>
- * 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 <jb@gcc.gnu.org>
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 <jb@gcc.gnu.org>
@@ -686,43 +692,43 @@
2009-04-08 Janne Blomqvist <jb@gcc.gnu.org>
- * 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 <jb@gcc.gnu.org>
- * 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 <hongjiu.lu@intel.com>
diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c
index 27ae899..ea1ef7a 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 5a81bd6..a102c3b 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;
}