Commit deeab820 by Andreas Jaeger

chdir.c, [...]: Include <string.h> for prototypes.

	* intrinsics/chdir.c, intrinsics/getlog.c, intrinsics/link.c,
	intrinsics/symlnk.c, intrinsics/perror.c: Include <string.h> for
	prototypes.

	* runtime/string.c (compare0): Remove unused variable.
	* io/unit.c (init_units): Remove unused variables.
	* intrinsics/getcwd.c (getcwd_i4_sub): Remove unused variable.
	* intrinsics/unlink.c (unlink_i4_sub): Remove unused variable.
	* intrinsics/stat.c (stat_i4_sub, fstat_i8_sub, fstat_i4_sub,
	stat_i8_sub): Remove unused variable.

From-SVN: r99716
parent 64fbae21
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.
* runtime/string.c (compare0): Remove unused variable.
* io/unit.c (init_units): Remove unused variables.
* intrinsics/getcwd.c (getcwd_i4_sub): Remove unused variable.
* intrinsics/unlink.c (unlink_i4_sub): Remove unused variable.
* intrinsics/stat.c (stat_i4_sub, fstat_i8_sub, fstat_i4_sub,
stat_i8_sub): Remove unused variable.
2005-05-12 Thomas Koenig <Thomas.Koenig@online.de> 2005-05-12 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/21324 PR libfortran/21324
......
...@@ -35,6 +35,9 @@ Boston, MA 02111-1307, USA. */ ...@@ -35,6 +35,9 @@ Boston, MA 02111-1307, USA. */
#include "../io/io.h" #include "../io/io.h"
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
#include <unistd.h> #include <unistd.h>
#endif #endif
......
/* Implementation of the GETCWD intrinsic. /* Implementation of the GETCWD intrinsic.
Copyright (C) 2004 Free Software Foundation, Inc. Copyright (C) 2004, 2005 Free Software Foundation, Inc.
Contributed by Steven G. Kargl <kargls@comcast.net>. Contributed by Steven G. Kargl <kargls@comcast.net>.
This file is part of the GNU Fortran 95 runtime library (libgfortran). This file is part of the GNU Fortran 95 runtime library (libgfortran).
...@@ -46,7 +46,7 @@ iexport_proto(getcwd_i4_sub); ...@@ -46,7 +46,7 @@ iexport_proto(getcwd_i4_sub);
void void
getcwd_i4_sub (char *cwd, GFC_INTEGER_4 *status, gfc_charlen_type cwd_len) getcwd_i4_sub (char *cwd, GFC_INTEGER_4 *status, gfc_charlen_type cwd_len)
{ {
char str[cwd_len + 1], *s; char str[cwd_len + 1];
GFC_INTEGER_4 stat; GFC_INTEGER_4 stat;
memset(cwd, ' ', (size_t) cwd_len); memset(cwd, ' ', (size_t) cwd_len);
......
...@@ -31,6 +31,9 @@ Boston, MA 02111-1307, USA. */ ...@@ -31,6 +31,9 @@ Boston, MA 02111-1307, USA. */
#include "config.h" #include "config.h"
#include "libgfortran.h" #include "libgfortran.h"
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
#include <unistd.h> #include <unistd.h>
#endif #endif
......
...@@ -35,6 +35,9 @@ Boston, MA 02111-1307, USA. */ ...@@ -35,6 +35,9 @@ Boston, MA 02111-1307, USA. */
#include "../io/io.h" #include "../io/io.h"
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
#include <unistd.h> #include <unistd.h>
#endif #endif
......
...@@ -36,6 +36,9 @@ Boston, MA 02111-1307, USA. */ ...@@ -36,6 +36,9 @@ Boston, MA 02111-1307, USA. */
#include "../io/io.h" #include "../io/io.h"
#ifdef HAVE_STRING_H
#include <string.h>
#endif
/* SUBROUTINE PERROR(STRING) /* SUBROUTINE PERROR(STRING)
CHARACTER(len=*), INTENT(IN) :: STRING */ CHARACTER(len=*), INTENT(IN) :: STRING */
......
/* Implementation of the STAT and FSTAT intrinsics. /* Implementation of the STAT and FSTAT intrinsics.
Copyright (C) 2004 Free Software Foundation, Inc. Copyright (C) 2004, 2005 Free Software Foundation, Inc.
Contributed by Steven G. Kargl <kargls@comcast.net>. Contributed by Steven G. Kargl <kargls@comcast.net>.
This file is part of the GNU Fortran 95 runtime library (libgfortran). This file is part of the GNU Fortran 95 runtime library (libgfortran).
...@@ -73,8 +73,6 @@ stat_i4_sub (char *name, gfc_array_i4 *sarray, GFC_INTEGER_4 *status, ...@@ -73,8 +73,6 @@ stat_i4_sub (char *name, gfc_array_i4 *sarray, GFC_INTEGER_4 *status,
char *str; char *str;
struct stat sb; struct stat sb;
index_type stride[GFC_MAX_DIMENSIONS];
/* If the rank of the array is not 1, abort. */ /* If the rank of the array is not 1, abort. */
if (GFC_DESCRIPTOR_RANK (sarray) != 1) if (GFC_DESCRIPTOR_RANK (sarray) != 1)
runtime_error ("Array rank of SARRAY is not 1."); runtime_error ("Array rank of SARRAY is not 1.");
...@@ -168,8 +166,6 @@ stat_i8_sub (char *name, gfc_array_i8 *sarray, GFC_INTEGER_8 *status, ...@@ -168,8 +166,6 @@ stat_i8_sub (char *name, gfc_array_i8 *sarray, GFC_INTEGER_8 *status,
char *str; char *str;
struct stat sb; struct stat sb;
index_type stride[GFC_MAX_DIMENSIONS];
/* If the rank of the array is not 1, abort. */ /* If the rank of the array is not 1, abort. */
if (GFC_DESCRIPTOR_RANK (sarray) != 1) if (GFC_DESCRIPTOR_RANK (sarray) != 1)
runtime_error ("Array rank of SARRAY is not 1."); runtime_error ("Array rank of SARRAY is not 1.");
...@@ -293,8 +289,6 @@ fstat_i4_sub (GFC_INTEGER_4 *unit, gfc_array_i4 *sarray, GFC_INTEGER_4 *status) ...@@ -293,8 +289,6 @@ fstat_i4_sub (GFC_INTEGER_4 *unit, gfc_array_i4 *sarray, GFC_INTEGER_4 *status)
int val; int val;
struct stat sb; struct stat sb;
index_type stride[GFC_MAX_DIMENSIONS];
/* If the rank of the array is not 1, abort. */ /* If the rank of the array is not 1, abort. */
if (GFC_DESCRIPTOR_RANK (sarray) != 1) if (GFC_DESCRIPTOR_RANK (sarray) != 1)
runtime_error ("Array rank of SARRAY is not 1."); runtime_error ("Array rank of SARRAY is not 1.");
...@@ -379,8 +373,6 @@ fstat_i8_sub (GFC_INTEGER_8 *unit, gfc_array_i8 *sarray, GFC_INTEGER_8 *status) ...@@ -379,8 +373,6 @@ fstat_i8_sub (GFC_INTEGER_8 *unit, gfc_array_i8 *sarray, GFC_INTEGER_8 *status)
int val; int val;
struct stat sb; struct stat sb;
index_type stride[GFC_MAX_DIMENSIONS];
/* If the rank of the array is not 1, abort. */ /* If the rank of the array is not 1, abort. */
if (GFC_DESCRIPTOR_RANK (sarray) != 1) if (GFC_DESCRIPTOR_RANK (sarray) != 1)
runtime_error ("Array rank of SARRAY is not 1."); runtime_error ("Array rank of SARRAY is not 1.");
......
...@@ -35,6 +35,9 @@ Boston, MA 02111-1307, USA. */ ...@@ -35,6 +35,9 @@ Boston, MA 02111-1307, USA. */
#include "../io/io.h" #include "../io/io.h"
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
#include <unistd.h> #include <unistd.h>
#endif #endif
......
/* Implementation of the UNLINK intrinsic. /* Implementation of the UNLINK intrinsic.
Copyright (C) 2004 Free Software Foundation, Inc. Copyright (C) 2004, 2005 Free Software Foundation, Inc.
Contributed by Steven G. Kargl <kargls@comcast.net>. Contributed by Steven G. Kargl <kargls@comcast.net>.
This file is part of the GNU Fortran 95 runtime library (libgfortran). This file is part of the GNU Fortran 95 runtime library (libgfortran).
...@@ -51,7 +51,7 @@ iexport_proto(unlink_i4_sub); ...@@ -51,7 +51,7 @@ iexport_proto(unlink_i4_sub);
void void
unlink_i4_sub (char *name, GFC_INTEGER_4 *status, gfc_charlen_type name_len) unlink_i4_sub (char *name, GFC_INTEGER_4 *status, gfc_charlen_type name_len)
{ {
char *str, *s; char *str;
GFC_INTEGER_4 stat; GFC_INTEGER_4 stat;
/* Trim trailing spaces from name. */ /* Trim trailing spaces from name. */
......
/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. /* Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
Contributed by Andy Vaught Contributed by Andy Vaught
This file is part of the GNU Fortran 95 runtime library (libgfortran). This file is part of the GNU Fortran 95 runtime library (libgfortran).
...@@ -288,7 +288,6 @@ is_internal_unit () ...@@ -288,7 +288,6 @@ is_internal_unit ()
void void
init_units (void) init_units (void)
{ {
gfc_offset m, n;
gfc_unit *u; gfc_unit *u;
int i; int i;
......
/* Copyright (C) 2002-2003 Free Software Foundation, Inc. /* Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
Contributed by Paul Brook Contributed by Paul Brook
This file is part of the GNU Fortran 95 runtime library (libgfortran). This file is part of the GNU Fortran 95 runtime library (libgfortran).
...@@ -40,12 +40,11 @@ Boston, MA 02111-1307, USA. */ ...@@ -40,12 +40,11 @@ Boston, MA 02111-1307, USA. */
static int static int
compare0 (const char *s1, int s1_len, const char *s2) compare0 (const char *s1, int s1_len, const char *s2)
{ {
int i;
int len; int len;
/* Strip trailing blanks from the Fortran string. */ /* Strip trailing blanks from the Fortran string. */
len = fstrlen(s1, s1_len); len = fstrlen (s1, s1_len);
return strncasecmp(s1,s2,len) == 0; return strncasecmp (s1, s2, len) == 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment