aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/repo.c
diff options
context:
space:
mode:
authorBrendan Kehoe <brendan@lisa.cygnus.com>1997-11-03 23:20:24 +0000
committerBrendan Kehoe <brendan@lisa.cygnus.com>1997-11-03 23:20:24 +0000
commit3022e869c8dda62e49326658094f081e580f79b3 (patch)
tree185c5d57a3e384b7c593ae5da958e3d5996f7dd9 /gcc/cp/repo.c
parent68406b9a36f2dd5a6e88d43f8855936ca4c41f1d (diff)
* repo.c (rindex): Add decl unconditionally.
(get_base_filename, open_repo_file): Don't cast rindex. * xref.c (rindex): Add decl unconditionally. (index): Remove unused decl. (open_xref_file): Don't cast rindex. fix potential problems with 64-bit compilers and casting an int up to a char* git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@16306 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/repo.c')
-rw-r--r--gcc/cp/repo.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/cp/repo.c b/gcc/cp/repo.c
index e029f90acea..d18730ccb1c 100644
--- a/gcc/cp/repo.c
+++ b/gcc/cp/repo.c
@@ -34,15 +34,15 @@ Boston, MA 02111-1307, USA. */
#ifdef HAVE_STRING_H
#include <string.h>
-#else
-extern char * rindex ();
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#else
extern char * getenv ();
#endif
-extern char * getpwd PROTO((void));
+
+extern char *rindex ();
+extern char *getpwd PROTO((void));
static tree repo_get_id PROTO((tree));
static char *save_string PROTO((char *, int));
@@ -277,7 +277,7 @@ get_base_filename (filename)
return NULL;
}
- p = (char *) rindex (filename, '/');
+ p = rindex (filename, '/');
if (p)
return p+1;
else
@@ -294,10 +294,10 @@ open_repo_file (filename)
if (s == NULL)
return;
- p = (char *) rindex (s, '/');
+ p = rindex (s, '/');
if (! p)
p = s;
- p = (char *) rindex (p, '.');
+ p = rindex (p, '.');
if (! p)
p = s + strlen (s);