libgfortran warning fixes due to missing <string.h>
Andreas Jaeger
aj@suse.de
Sat May 14 22:32:00 GMT 2005
[resending with correct fortran mailing list]
../../../libgfortran/intrinsics/getlog.c: In function '_gfortran_getlog':
../../../libgfortran/intrinsics/getlog.c:53: warning: implicit declaration of function 'memset'
../../../libgfortran/intrinsics/getlog.c:53: warning: incompatible implicit declaration of built-in function 'memset'
../../../libgfortran/intrinsics/getlog.c:59: warning: implicit declaration of function 'strlen'
../../../libgfortran/intrinsics/getlog.c:59: warning: incompatible implicit declaration of built-in function 'strlen'
../../../libgfortran/intrinsics/getlog.c:61: warning: implicit declaration of function 'memcpy'
../../../libgfortran/intrinsics/getlog.c:61: warning: incompatible implicit declaration of built-in function 'memcpy'
../../../libgfortran/intrinsics/getlog.c:63: warning: incompatible implicit declaration of built-in function 'memcpy'
Similar warnings appers in intrinsics/link.c, etc.
Ok to commit to both 4.0 and mainline after full testing passed on
Linux/x86-64? I've tested just the compile now and will do a complete
bootstrap now together with my other fortran patches.
Andreas
2005-05-15 Andreas Jaeger <aj@suse.de>
* intrinsics/chdir.c, intrinsics/getlog.c, intrinsics/link.c,
intrinsics/symlnk.c, intrinsics/perror.c: Include <string.h> for
prototypes.
============================================================
Index: libgfortran/intrinsics/chdir.c
--- intrinsics/chdir.c 22 Mar 2005 22:08:22 -0000 1.1
+++ intrinsics/chdir.c 14 May 2005 22:27:19 -0000
@@ -35,6 +35,9 @@ Boston, MA 02111-1307, USA. */
#include "../io/io.h"
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
============================================================
Index: libgfortran/intrinsics/getlog.c
--- intrinsics/getlog.c 22 Mar 2005 22:08:22 -0000 1.1
+++ intrinsics/getlog.c 14 May 2005 22:27:19 -0000
@@ -31,6 +31,9 @@ Boston, MA 02111-1307, USA. */
#include "config.h"
#include "libgfortran.h"
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
============================================================
Index: libgfortran/intrinsics/link.c
--- intrinsics/link.c 22 Mar 2005 22:08:22 -0000 1.1
+++ intrinsics/link.c 14 May 2005 22:27:19 -0000
@@ -35,6 +35,9 @@ Boston, MA 02111-1307, USA. */
#include "../io/io.h"
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
============================================================
Index: libgfortran/intrinsics/symlnk.c
--- intrinsics/symlnk.c 22 Mar 2005 22:08:22 -0000 1.1
+++ intrinsics/symlnk.c 14 May 2005 22:27:19 -0000
@@ -35,6 +35,9 @@ Boston, MA 02111-1307, USA. */
#include "../io/io.h"
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
============================================================
Index: libgfortran/intrinsics/perror.c
--- intrinsics/perror.c 22 Mar 2005 22:08:22 -0000 1.1
+++ intrinsics/perror.c 14 May 2005 22:27:19 -0000
@@ -36,6 +36,9 @@ Boston, MA 02111-1307, USA. */
#include "../io/io.h"
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
/* SUBROUTINE PERROR(STRING)
CHARACTER(len=*), INTENT(IN) :: STRING */
--
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/20050514/f270021e/attachment.sig>
More information about the Fortran
mailing list