This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[libgfortran,committed] Fix warnings


I've committed the following as obvious, to fix two warnings in libgfortran, after bootstraping and regtesting on x86_64-linux. There are a bunch of remaining warnings, all due to the same issue with enums (see PR22423).


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.



Index: runtime/string.c
===================================================================
--- runtime/string.c	(revision 147248)
+++ runtime/string.c	(working copy)
@@ -36,7 +36,10 @@

   /* 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;
 }

Index: io/transfer.c
===================================================================
--- io/transfer.c	(revision 147248)
+++ io/transfer.c	(working copy)
@@ -465,7 +465,7 @@
   /* 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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]