From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15130 invoked by alias); 14 Sep 2004 03:02:50 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 15121 invoked from network); 14 Sep 2004 03:02:50 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 14 Sep 2004 03:02:50 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.10) with ESMTP id i8E32ja3010344 for ; Mon, 13 Sep 2004 23:02:50 -0400 Received: from zenia.home.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i8E32hr24427; Mon, 13 Sep 2004 23:02:44 -0400 To: gdb-patches@sources.redhat.com Subject: PATCH: remove unused variables and code in value_assign From: Jim Blandy Date: Tue, 14 Sep 2004 03:02:00 -0000 Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2004-09/txt/msg00224.txt.bz2 Committed as obvious. 2004-09-13 Jim Blandy * valops.c (value_assign): 'use_buffer' is initialized to zero, and never assigned to. Delete it, and the 'if (use_buffer)' clauses. Delete 'raw_buffer', since it is now unused. Index: gdb/valops.c =================================================================== RCS file: /cvs/src/src/gdb/valops.c,v retrieving revision 1.130 diff -c -p -r1.130 valops.c *** gdb/valops.c 14 Sep 2004 02:51:27 -0000 1.130 --- gdb/valops.c 14 Sep 2004 02:58:34 -0000 *************** value_assign (struct value *toval, struc *** 525,532 **** { struct type *type; struct value *val; - char raw_buffer[MAX_REGISTER_SIZE]; - int use_buffer = 0; struct frame_id old_frame; if (!toval->modifiable) --- 525,530 ---- *************** value_assign (struct value *toval, struc *** 591,602 **** changed_addr = VALUE_ADDRESS (toval) + VALUE_OFFSET (toval); dest_buffer = buffer; } - else if (use_buffer) - { - changed_addr = VALUE_ADDRESS (toval) + VALUE_OFFSET (toval); - changed_len = use_buffer; - dest_buffer = raw_buffer; - } else { changed_addr = VALUE_ADDRESS (toval) + VALUE_OFFSET (toval); --- 589,594 ---- *************** value_assign (struct value *toval, struc *** 683,690 **** modify_field (buffer + byte_offset, value_as_long (fromval), VALUE_BITPOS (toval), VALUE_BITSIZE (toval)); - else if (use_buffer) - memcpy (buffer + VALUE_OFFSET (toval), raw_buffer, use_buffer); else memcpy (buffer + byte_offset, VALUE_CONTENTS (fromval), TYPE_LENGTH (type)); --- 675,680 ----