From patchwork Tue Apr 12 14:14:55 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Freyn X-Patchwork-Id: 90813 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 8D4BCB6F15 for ; Wed, 13 Apr 2011 00:15:10 +1000 (EST) Received: (qmail 8624 invoked by alias); 12 Apr 2011 14:15:08 -0000 Received: (qmail 8615 invoked by uid 22791); 12 Apr 2011 14:15:07 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, TW_RG, T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mailout-de.gmx.net (HELO mailout-de.gmx.net) (213.165.64.22) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Tue, 12 Apr 2011 14:15:01 +0000 Received: (qmail invoked by alias); 12 Apr 2011 14:14:59 -0000 Received: from LN-mac29.grenoble.cnrs.fr (EHLO axel) [147.173.67.29] by mail.gmx.net (mp010) with SMTP; 12 Apr 2011 16:14:59 +0200 Date: Tue, 12 Apr 2011 16:14:55 +0200 From: Axel Freyn To: gcc-patches@gcc.gnu.org Subject: proposed patch -- remove superflous lines Message-ID: <20110412141455.GT3858@axel> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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);