From 37620334d9357703c406caff5f6255fa59f83421 Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Wed, 2 Aug 2000 20:21:27 +0000 Subject: gcc.h (lang_specific_driver): Constify second argument. * gcc.h (lang_specific_driver): Constify second argument. * gcc.c (translate_options, process_command, main): Likewise. Constify variables to match. Cast second argument to pexecute. * cppspec.c, gccspec.c, g++spec.c, g77spec.c, jvspec.c: Adjust type of second argument to lang_specific_driver, and update code as necessary. From-SVN: r35433 --- gcc/java/jvspec.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'gcc/java/jvspec.c') diff --git a/gcc/java/jvspec.c b/gcc/java/jvspec.c index 58592f8..7b12448 100644 --- a/gcc/java/jvspec.c +++ b/gcc/java/jvspec.c @@ -93,7 +93,7 @@ find_spec_file (dir) void lang_specific_driver (in_argc, in_argv, in_added_libraries) int *in_argc; - char ***in_argv; + const char *const **in_argv; int *in_added_libraries; { int i, j; @@ -139,7 +139,6 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries) const char *quote = NULL; /* The new argument list will be contained in this. */ - char **real_arglist; const char **arglist; /* Non-zero if we saw a `-xfoo' language specification on the @@ -181,7 +180,7 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries) int argc; /* The argument list. */ - char **argv; + const char *const *argv; /* The number of libraries added in. */ int added_libraries; @@ -392,8 +391,8 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries) if (saw_g + saw_O == 0) num_args++; num_args++; - arglist = (const char **) - (real_arglist = (char **) xmalloc ((num_args + 1) * sizeof (char *))); + + arglist = (const char **) xmalloc ((num_args + 1) * sizeof (char *)); for (i = 0, j = 0; i < argc; i++, j++) { @@ -488,7 +487,7 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries) arglist[j] = NULL; *in_argc = j; - *in_argv = real_arglist; + *in_argv = arglist; *in_added_libraries = added_libraries; } -- cgit v1.1