Two small patches for gfortran warnings

Andreas Jaeger aj@suse.de
Fri Jul 1 05:44:00 GMT 2005


I get these warnings compiling gfortran:
/cvs/gcc/libgfortran/io/transfer.c:442: warning: unused variable ‘i’
/cvs/gcc/libgfortran/intrinsics/unpack_generic.c:194: warning: passing argument 1 of ‘unpack1’ discards qualifiers from pointer target type

The first patch removes the unused variable, the second one removes
the const for the return type.  I've committed them after testing on
Linux/x86-64 as obvious,

Andreas

2005-07-01  Andreas Jaeger  <aj@suse.de>

	* intrinsics/unpack_generic.c: Remove const from parameter.

	* io/transfer.c (formatted_transfer): Remove unused variable.

============================================================
Index: libgfortran/io/transfer.c
--- libgfortran/io/transfer.c	28 Jun 2005 10:43:23 -0000	1.45
+++ libgfortran/io/transfer.c	1 Jul 2005 05:33:53 -0000
@@ -439,7 +439,7 @@ formatted_transfer (bt type, void *p, in
 {
   int pos ,m ;
   fnode *f;
-  int i, n;
+  int n;
   int consume_data_flag;
 
   /* Change a complex data item into a pair of reals.  */
============================================================
Index: libgfortran/intrinsics/unpack_generic.c
--- libgfortran/intrinsics/unpack_generic.c	26 May 2005 06:26:07 -0000	1.7
+++ libgfortran/intrinsics/unpack_generic.c	1 Jul 2005 05:33:53 -0000
@@ -179,12 +179,12 @@ unpack1 (gfc_array_char *ret, const gfc_
 }
 iexport(unpack1);
 
-extern void unpack0 (const gfc_array_char *, const gfc_array_char *,
+extern void unpack0 (gfc_array_char *, const gfc_array_char *,
 		     const gfc_array_l4 *, char *);
 export_proto(unpack0);
 
 void
-unpack0 (const gfc_array_char *ret, const gfc_array_char *vector,
+unpack0 (gfc_array_char *ret, const gfc_array_char *vector,
 	 const gfc_array_l4 *mask, char *field)
 {
   gfc_array_char tmp;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20050701/c4635e4e/attachment.sig>
-------------- next part --------------

-- 
 Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
  SUSE Linux Products GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany
   GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20050701/c4635e4e/attachment-0001.sig>


More information about the Fortran mailing list