From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 55966 invoked by alias); 12 Jul 2018 20:52:32 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 55835 invoked by uid 89); 12 Jul 2018 20:52:31 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.6 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:962, Calling X-HELO: gateway30.websitewelcome.com Received: from gateway30.websitewelcome.com (HELO gateway30.websitewelcome.com) (192.185.145.3) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 12 Jul 2018 20:52:30 +0000 Received: from cm10.websitewelcome.com (cm10.websitewelcome.com [100.42.49.4]) by gateway30.websitewelcome.com (Postfix) with ESMTP id AFEC8AA17 for ; Thu, 12 Jul 2018 15:52:28 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id diZPf0mG0BcCXdiZZfhqfl; Thu, 12 Jul 2018 15:52:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=/pvENIIAolEuy1hOLSAdH+QDIoz3iH/umXUXw+aaZqM=; b=CdjzFqVd7vEZZyREZP6M9qk4N4 K3EIOqX5MOHZE4s++Y95hq8h9830DmmA19yf4NX3B2AXkWjtEuHUjLWqcRF1589NoFmJgOpvvGAIE csTL5NSeYQPPXJbX2/wDS6tdZ; Received: from 75-166-85-72.hlrn.qwest.net ([75.166.85.72]:49432 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1fdiZP-001ZuD-Iu; Thu, 12 Jul 2018 15:52:11 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFA 03/13] Use a previously unused variable in bfin-tdep.c Date: Thu, 12 Jul 2018 20:52:00 -0000 Message-Id: <20180712205208.32646-4-tom@tromey.com> In-Reply-To: <20180712205208.32646-1-tom@tromey.com> References: <20180712205208.32646-1-tom@tromey.com> X-SW-Source: 2018-07/txt/msg00352.txt.bz2 This changes bfin_push_dummy_call to use the result of check_typedef. Calling check_typedef for effect was probably ok as well, but this seemed a little nicer. gdb/ChangeLog 2018-07-12 Tom Tromey * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not value_type. --- gdb/ChangeLog | 5 +++++ gdb/bfin-tdep.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/bfin-tdep.c b/gdb/bfin-tdep.c index da62130231b..c84625c8948 100644 --- a/gdb/bfin-tdep.c +++ b/gdb/bfin-tdep.c @@ -526,7 +526,7 @@ bfin_push_dummy_call (struct gdbarch *gdbarch, { struct type *value_type = value_enclosing_type (args[i]); struct type *arg_type = check_typedef (value_type); - int container_len = (TYPE_LENGTH (value_type) + 3) & ~3; + int container_len = (TYPE_LENGTH (arg_type) + 3) & ~3; sp -= container_len; write_memory (sp, value_contents (args[i]), container_len); -- 2.13.6