diff options
author | Brendan Kehoe <brendan@lisa.cygnus.com> | 1997-11-03 23:20:24 +0000 |
---|---|---|
committer | Brendan Kehoe <brendan@gcc.gnu.org> | 1997-11-03 18:20:24 -0500 |
commit | a8a63732c4f3ee7af0543a1790f9076363205213 (patch) | |
tree | 185c5d57a3e384b7c593ae5da958e3d5996f7dd9 /gcc/cp/xref.c | |
parent | 08bb4b3b2cfdd4cf3c7621df2ec9933041a1bbde (diff) | |
download | gcc-a8a63732c4f3ee7af0543a1790f9076363205213.zip gcc-a8a63732c4f3ee7af0543a1790f9076363205213.tar.gz gcc-a8a63732c4f3ee7af0543a1790f9076363205213.tar.bz2 |
repo.c (rindex): Add decl unconditionally.
* 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*
From-SVN: r16306
Diffstat (limited to 'gcc/cp/xref.c')
-rw-r--r-- | gcc/cp/xref.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/cp/xref.c b/gcc/cp/xref.c index b579588..6269f17 100644 --- a/gcc/cp/xref.c +++ b/gcc/cp/xref.c @@ -40,11 +40,10 @@ extern char *getpwd PROTO((void)); #ifdef HAVE_STRING_H #include <string.h> -#else -extern char *index (); -extern char *rindex (); #endif +extern char *rindex (); + /* The character(s) used to join a directory specification (obtained with getwd or equivalent) with a non-absolute file name. */ @@ -813,14 +812,14 @@ open_xref_file(file) #ifdef XREF_FILE_NAME XREF_FILE_NAME (xref_name, file); #else - s = (char *) rindex (file, '/'); + s = rindex (file, '/'); if (s == NULL) sprintf (xref_name, ".%s.gxref", file); else { ++s; strcpy (xref_name, file); - t = (char *) rindex (xref_name, '/'); + t = rindex (xref_name, '/'); ++t; *t++ = '.'; strcpy (t, s); |