From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 5eA4D1QhgGBFNwAAWB0awg (envelope-from ) for ; Wed, 21 Apr 2021 08:57:56 -0400 Received: by simark.ca (Postfix, from userid 112) id 314441F104; Wed, 21 Apr 2021 08:57:56 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 83BBB1E783 for ; Wed, 21 Apr 2021 08:57:55 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3107239B703D; Wed, 21 Apr 2021 12:57:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3107239B703D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1619009875; bh=57yx/0dJ384lHZw/hgoeuJtIQ/nS2TSchbMYBUBoDqY=; h=To:Subject:Date:In-Reply-To:References:In-Reply-To:References: List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help: List-Subscribe:From:Reply-To:From; b=f4XrnVhB6heOIBbnFdj1ip6q4frnDkJ1moLTHdHphOueDuc97hxhcqabMjQtCc4i+ K9a6WBoWHy87L5Ck+cuX8hgTTVOSppNZnzKROY1w9/m5W2SVZ6dSRZQamwvwekIRf7 KT3ELlSAindjzA6NFecjE/b97E652YdW1CUhwGFY= Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by sourceware.org (Postfix) with ESMTPS id 864113860C32 for ; Wed, 21 Apr 2021 12:57:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 864113860C32 IronPort-SDR: srnKzAIzvGzZyx/opKtc1NkwPbEVG2uIoEr2+iXHJhAPChP2HPZANMQBeqh3OEH6t0SzXdH6rI shxmrrtZfbHA== X-IronPort-AV: E=McAfee;i="6200,9189,9960"; a="193569382" X-IronPort-AV: E=Sophos;i="5.82,238,1613462400"; d="scan'208";a="193569382" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Apr 2021 05:57:50 -0700 IronPort-SDR: rUiFE8lCSyKlsQA2geKApTwq3jdtt65gwQuRxZc0xPnGNq1JiUPaZicy74kj9g09tcXFvmBYT9 iUJpNrS3ilGQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,238,1613462400"; d="scan'208";a="391471080" Received: from irvmail001.ir.intel.com ([10.43.11.63]) by fmsmga007.fm.intel.com with ESMTP; 21 Apr 2021 05:57:49 -0700 Received: from ulvlx001.iul.intel.com (ulvlx001.iul.intel.com [172.28.207.17]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id 13LCvng6011347; Wed, 21 Apr 2021 13:57:49 +0100 Received: from ulvlx001.iul.intel.com (localhost [127.0.0.1]) by ulvlx001.iul.intel.com with ESMTP id 13LCvmDW031928; Wed, 21 Apr 2021 14:57:48 +0200 Received: (from taktemur@localhost) by ulvlx001.iul.intel.com with LOCAL id 13LCvmw8031924; Wed, 21 Apr 2021 14:57:48 +0200 To: gdb-patches@sourceware.org Subject: [PATCH 1/6] gdb/infcmd: remove the unused parameter 'args' in 'attach_post_wait' Date: Wed, 21 Apr 2021 14:57:26 +0200 Message-Id: <0013ebfdeb103a5142264bf02fc7abc4628a572a.1619009681.git.tankut.baris.aktemur@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: References: In-Reply-To: References: X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Tankut Baris Aktemur via Gdb-patches Reply-To: Tankut Baris Aktemur Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" gdb/ChangeLog: 2021-04-21 Tankut Baris Aktemur * infcmd.c (attach_post_wait): Remove the unused parameter 'args'. Update the references below. (struct attach_command_continuation_args) (attach_command_continuation) (attach_command_continuation_free_args) (attach_command) (notice_new_inferior): Update to remove the reference to 'args'. --- gdb/infcmd.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/gdb/infcmd.c b/gdb/infcmd.c index 60f25d24686..f89eb7beb03 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -2471,7 +2471,7 @@ enum attach_post_wait_mode should be running. Else if ATTACH, */ static void -attach_post_wait (const char *args, int from_tty, enum attach_post_wait_mode mode) +attach_post_wait (int from_tty, enum attach_post_wait_mode mode) { struct inferior *inferior; @@ -2542,7 +2542,6 @@ attach_post_wait (const char *args, int from_tty, enum attach_post_wait_mode mod struct attach_command_continuation_args { - char *args; int from_tty; enum attach_post_wait_mode mode; }; @@ -2556,7 +2555,7 @@ attach_command_continuation (void *args, int err) if (err) return; - attach_post_wait (a->args, a->from_tty, a->mode); + attach_post_wait (a->from_tty, a->mode); } static void @@ -2565,7 +2564,6 @@ attach_command_continuation_free_args (void *args) struct attach_command_continuation_args *a = (struct attach_command_continuation_args *) args; - xfree (a->args); xfree (a); } @@ -2677,7 +2675,6 @@ attach_command (const char *args, int from_tty) /* Wait for stop. */ a = XNEW (struct attach_command_continuation_args); - a->args = xstrdup (args); a->from_tty = from_tty; a->mode = mode; add_inferior_continuation (attach_command_continuation, a, @@ -2692,7 +2689,7 @@ attach_command (const char *args, int from_tty) return; } else - attach_post_wait (args, from_tty, mode); + attach_post_wait (from_tty, mode); disable_commit_resumed.reset_and_commit (); } @@ -2737,7 +2734,6 @@ notice_new_inferior (thread_info *thr, int leave_running, int from_tty) /* Wait for stop before proceeding. */ a = XNEW (struct attach_command_continuation_args); - a->args = xstrdup (""); a->from_tty = from_tty; a->mode = mode; add_inferior_continuation (attach_command_continuation, a, @@ -2746,7 +2742,7 @@ notice_new_inferior (thread_info *thr, int leave_running, int from_tty) return; } - attach_post_wait ("" /* args */, from_tty, mode); + attach_post_wait (from_tty, mode); } /* -- 2.17.1