proposed patch -- remove superflous lines

Axel Freyn axel-freyn@gmx.de
Tue Apr 12 14:15:00 GMT 2011


Hi,

as that's the first time I propose a patch for gcc: sorry for all formal
mistakes (and please tell me what I should do differently ...)

Those lines were introduced in svn:164531 (22. Sep. 2010), but in
svn:166534 (10. Nov. 2010) the part which could change "argv_copied"
was removed. As no-where in the trunk "argv_copied" appears, I'm quite
sure those three lines could be removed.

(the diff is generated against svn:172299)


diff --git a/gcc/opts-common.c b/gcc/opts-common.c
index e314cb3..089d819 100644
--- a/gcc/opts-common.c
+++ b/gcc/opts-common.c
@@ -693,7 +693,6 @@ decode_cmdline_options_to_array (unsigned int argc, const char **argv,
   unsigned int n, i;
   struct cl_decoded_option *opt_array;
   unsigned int num_decoded_options;
-  bool argv_copied = false;
 
   opt_array = XNEWVEC (struct cl_decoded_option, argc);
 
@@ -728,8 +727,6 @@ decode_cmdline_options_to_array (unsigned int argc, const char **argv,
       num_decoded_options++;
     }
 
-  if (argv_copied)
-    free (argv);
   *decoded_options = opt_array;
   *decoded_options_count = num_decoded_options;
   prune_options (decoded_options, decoded_options_count);


Axel



More information about the Gcc-patches mailing list