From patchwork Tue Apr 12 14:14:55 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: proposed patch -- remove superflous lines From: Axel Freyn X-Patchwork-Id: 90813 Message-Id: <20110412141455.GT3858@axel> To: gcc-patches@gcc.gnu.org Date: Tue, 12 Apr 2011 16:14:55 +0200 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) Axel 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);