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]

[gfortran] Fix warning when compiling intrinsic.c


gfc_resolve_getcwd only took one argument. getcwd is being added to the
intrinsic table with add_sym_1 which expects a resolution function with two
arguments. Since getcwd does indeed take one argument I propose this fix.

Built and tested along with some other patches.

- Tobi

2004-09-24  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>

	* intrinsic.h (gfc_resolve_getcwd): Update prototype.
	* iresolve.c (gfc_resolve_getcwd): Add second argument to function.

Index: intrinsic.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fortran/intrinsic.h,v
retrieving revision 1.15
diff -u -p -r1.15 intrinsic.h
--- intrinsic.h 15 Sep 2004 14:09:07 -0000      1.15
+++ intrinsic.h 24 Sep 2004 11:48:50 -0000
@@ -257,7 +257,7 @@ void gfc_resolve_exponent (gfc_expr *, g
 void gfc_resolve_floor (gfc_expr *, gfc_expr *, gfc_expr *);
 void gfc_resolve_fraction (gfc_expr *, gfc_expr *);
 void gfc_resolve_g77_math1 (gfc_expr *, gfc_expr *);
-void gfc_resolve_getcwd (gfc_expr *);
+void gfc_resolve_getcwd (gfc_expr *, gfc_expr *);
 void gfc_resolve_getgid (gfc_expr *);
 void gfc_resolve_getpid (gfc_expr *);
 void gfc_resolve_getuid (gfc_expr *);
Index: iresolve.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fortran/iresolve.c,v
retrieving revision 1.16
diff -u -p -r1.16 iresolve.c
--- iresolve.c  15 Sep 2004 14:09:07 -0000      1.16
+++ iresolve.c  24 Sep 2004 11:48:50 -0000
@@ -572,7 +572,7 @@ gfc_resolve_g77_math1 (gfc_expr * f, gfc


 void
-gfc_resolve_getcwd (gfc_expr * f)
+gfc_resolve_getcwd (gfc_expr * f, gfc_expr * n ATTRIBUTE_UNUSED)
 {
   f->ts.type = BT_INTEGER;
   f->ts.kind = 4;


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