diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-09-12 19:46:45 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-09-12 19:46:45 +0000 |
commit | 3f24af9bf4eb9b03c7bfe188eba1e9cadc1ae4ad (patch) | |
tree | 605928edb601a58710dd81dc6f1253e604104372 /gcc/cp/repo.c | |
parent | 4fe9de846eab9213fe5b189767266f20f170f02b (diff) | |
download | gcc-3f24af9bf4eb9b03c7bfe188eba1e9cadc1ae4ad.tar.gz |
gcc/
* dbgcnt.c (dbg_cnt_process_single_pair): constify.
* opts.c (common_handle_option): constify.
gcc/cp/
* repo.c (extract_string, get_base_filename, init_repo): constify.
libcpp/
* directives.c (cpp_define): constify.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151661 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/repo.c')
-rw-r--r-- | gcc/cp/repo.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/gcc/cp/repo.c b/gcc/cp/repo.c index 0f531e2627c..aa970785ca3 100644 --- a/gcc/cp/repo.c +++ b/gcc/cp/repo.c @@ -37,7 +37,7 @@ along with GCC; see the file COPYING3. If not see #include "diagnostic.h" #include "flags.h" -static char *extract_string (char **); +static const char *extract_string (const char **); static const char *get_base_filename (const char *); static FILE *open_repo_file (const char *); static char *afgets (FILE *); @@ -53,10 +53,10 @@ static bool temporary_obstack_initialized_p; /* Parse a reasonable subset of shell quoting syntax. */ -static char * -extract_string (char **pp) +static const char * +extract_string (const char **pp) { - char *p = *pp; + const char *p = *pp; int backquote = 0; int inside = 0; @@ -89,13 +89,13 @@ extract_string (char **pp) static const char * get_base_filename (const char *filename) { - char *p = getenv ("COLLECT_GCC_OPTIONS"); + const char *p = getenv ("COLLECT_GCC_OPTIONS"); const char *output = NULL; int compiling = 0; while (p && *p) { - char *q = extract_string (&p); + const char *q = extract_string (&p); if (strcmp (q, "-o") == 0) { @@ -161,6 +161,7 @@ void init_repo (void) { char *buf; + const char *p; FILE *repo_file; if (! flag_use_repository) @@ -212,8 +213,8 @@ init_repo (void) fclose (repo_file); if (old_args && !get_random_seed (true) - && (buf = strstr (old_args, "'-frandom-seed="))) - set_random_seed (extract_string (&buf) + strlen ("-frandom-seed=")); + && (p = strstr (old_args, "'-frandom-seed="))) + set_random_seed (extract_string (&p) + strlen ("-frandom-seed=")); } static FILE * |