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
This commit is contained in:
François-Xavier Coudert 2009-05-07 21:42:22 +00:00
parent 45b9b2e927
commit 743460ea82
3 changed files with 56 additions and 47 deletions

View File

@ -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> 2009-04-30 Janne Blomqvist <jb@gcc.gnu.org>
PR libfortran/39667 PR libfortran/39667

View File

@ -465,7 +465,7 @@ read_block_direct (st_parameter_dt *dtp, void *buf, size_t nbytes)
/* Check whether we exceed the total record length. */ /* Check whether we exceed the total record length. */
if (dtp->u.p.current_unit->flags.has_recl 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; to_read_record = dtp->u.p.current_unit->bytes_left;
short_record = 1; short_record = 1;

View File

@ -36,7 +36,10 @@ compare0 (const char *s1, gfc_charlen_type s1_len, const char *s2)
/* Strip trailing blanks from the Fortran string. */ /* Strip trailing blanks from the Fortran string. */
len = fstrlen (s1, s1_len); 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; return strncasecmp (s1, s2, len) == 0;
} }