From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7961 invoked by alias); 31 Jan 2013 03:25:10 -0000 Received: (qmail 7947 invoked by uid 22791); 31 Jan 2013 03:25:10 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,KHOP_SPAMHAUS_DROP,RCVD_IN_HOSTKARMA_YE,TW_BJ X-Spam-Check-By: sourceware.org Received: from na3sys009aog126.obsmtp.com (HELO na3sys009aog126.obsmtp.com) (74.125.149.155) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 31 Jan 2013 03:25:03 +0000 Received: from mx20.qnx.com ([72.1.200.103]) (using TLSv1) by na3sys009aob126.postini.com ([74.125.148.12]) with SMTP ID DSNKUQnkD8yDa3omiYsDHBwJoW60f4nmgKx8@postini.com; Wed, 30 Jan 2013 19:25:03 PST Received: by mx20.qnx.com (Postfix, from userid 500) id 9EE3A20E4B; Wed, 30 Jan 2013 22:25:02 -0500 (EST) Received: from exhts.ott.qnx.com (exch2 [10.222.2.136]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mx20.qnx.com (Postfix) with ESMTPS id 4CDF720E18 for ; Wed, 30 Jan 2013 22:25:02 -0500 (EST) Received: from [10.222.41.4] (10.222.2.5) by exch2.ott.qnx.com (10.222.2.136) with Microsoft SMTP Server id 14.2.318.4; Wed, 30 Jan 2013 22:25:01 -0500 Message-ID: <5109E40D.4010208@qnx.com> Date: Thu, 31 Jan 2013 03:25:00 -0000 From: Aleksandar Ristovski User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-Version: 1.0 Newsgroups: gmane.comp.gdb.patches To: "gdb-patches@sourceware.org" Subject: [patch] cleanup: remove unused - breakpoint, buildsym Content-Type: multipart/mixed; boundary="------------030004070902090505050300" 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 X-SW-Source: 2013-01/txt/msg00736.txt.bz2 --------------030004070902090505050300 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Content-length: 572 Hello, This is removing unused variables and allows compiling with -Wunused. Thanks, Aleksandar Ristovski QNX Software Systems ChangeLog: Aleksandar Ristovski * breakpoint.c (parse_cond_to_aexpr): Remove unused OLD_CHAIN. (print_it_watchpoint): Remove unused BL. (clear_command): Remove unused IS_ABS. (bpstat_remove_breakpoint_callback): Remove unused UIOUT. (bkpt_breakpoint_hit): Remove unused B. (internal_bkpt_print_it): Remove unused UIOUT. * buildsym.c (augment_type_symtab): Remove unused I. --------------030004070902090505050300 Content-Type: text/x-patch; name="Wunused-breakpoint-201301302126.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="Wunused-breakpoint-201301302126.patch" Content-length: 3225 Index: gdb/breakpoint.c =================================================================== RCS file: /cvs/src/src/gdb/breakpoint.c,v retrieving revision 1.738 diff -u -p -r1.738 breakpoint.c --- gdb/breakpoint.c 22 Jan 2013 20:19:38 -0000 1.738 +++ gdb/breakpoint.c 30 Jan 2013 22:25:14 -0000 @@ -2046,7 +2046,6 @@ static struct agent_expr * parse_cond_to_aexpr (CORE_ADDR scope, struct expression *cond) { struct agent_expr *aexpr = NULL; - struct cleanup *old_chain = NULL; volatile struct gdb_exception ex; if (!cond) @@ -2184,7 +2183,6 @@ parse_cmd_to_aexpr (CORE_ADDR scope, cha struct cleanup *old_cleanups = 0; struct expression *expr, **argvec; struct agent_expr *aexpr = NULL; - struct cleanup *old_chain = NULL; volatile struct gdb_exception ex; char *cmdrest; char *format_start, *format_end; @@ -10488,7 +10486,6 @@ print_it_watchpoint (bpstat bs) { struct cleanup *old_chain; struct breakpoint *b; - const struct bp_location *bl; struct ui_file *stb; enum print_stop_action result; struct watchpoint *w; @@ -10496,7 +10493,6 @@ print_it_watchpoint (bpstat bs) gdb_assert (bs->bp_location_at != NULL); - bl = bs->bp_location_at; b = bs->breakpoint_at; w = (struct watchpoint *) b; @@ -11950,8 +11946,6 @@ clear_command (char *arg, int from_tty) make_cleanup (VEC_cleanup (breakpoint_p), &found); for (i = 0; i < sals.nelts; i++) { - int is_abs; - /* If exact pc given, clear bpts at that pc. If line given (pc == 0), clear all bpts on specified line. If defaulting, clear all bpts on default line @@ -11965,7 +11959,6 @@ clear_command (char *arg, int from_tty) 1 0 */ sal = sals.sals[i]; - is_abs = sal.symtab == NULL ? 1 : IS_ABSOLUTE_PATH (sal.symtab->filename); /* Find all matching breakpoints and add them to 'found'. */ ALL_BREAKPOINTS (b) @@ -12717,7 +12710,6 @@ bpstat_remove_breakpoint_callback (struc static void say_where (struct breakpoint *b) { - struct ui_out *uiout = current_uiout; struct value_print_options opts; get_user_print_options (&opts); @@ -12985,8 +12977,6 @@ bkpt_breakpoint_hit (const struct bp_loc struct address_space *aspace, CORE_ADDR bp_addr, const struct target_waitstatus *ws) { - struct breakpoint *b = bl->owner; - if (ws->kind != TARGET_WAITKIND_STOPPED || ws->value.sig != GDB_SIGNAL_TRAP) return 0; @@ -13180,7 +13170,6 @@ internal_bkpt_check_status (bpstat bs) static enum print_stop_action internal_bkpt_print_it (bpstat bs) { - struct ui_out *uiout = current_uiout; struct breakpoint *b; b = bs->breakpoint_at; Index: gdb/buildsym.c =================================================================== RCS file: /cvs/src/src/gdb/buildsym.c,v retrieving revision 1.107 diff -u -p -r1.107 buildsym.c --- gdb/buildsym.c 21 Jan 2013 18:05:12 -0000 1.107 +++ gdb/buildsym.c 30 Jan 2013 22:25:14 -0000 @@ -1367,7 +1367,6 @@ void augment_type_symtab (struct objfile *objfile, struct symtab *primary_symtab) { struct blockvector *blockvector = primary_symtab->blockvector; - int i; if (context_stack_depth > 0) { --------------030004070902090505050300--