Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Aleksandar Ristovski <aristovski@qnx.com>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: [patch] cleanup: remove unused - breakpoint, buildsym
Date: Thu, 31 Jan 2013 03:25:00 -0000	[thread overview]
Message-ID: <5109E40D.4010208@qnx.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 572 bytes --]

Hello,

This is removing unused variables and allows compiling with -Wunused.

Thanks,

Aleksandar Ristovski
QNX Software Systems


ChangeLog:

Aleksandar Ristovski  <aristovski@qnx.com>

      * 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.


[-- Attachment #2: Wunused-breakpoint-201301302126.patch --]
[-- Type: text/x-patch, Size: 3225 bytes --]

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             <can't happen> */
 
       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)
     {


             reply	other threads:[~2013-01-31  3:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-31  3:25 Aleksandar Ristovski [this message]
2013-03-29  5:56 ` Joel Brobecker
2013-04-01 16:44   ` Aleksandar Ristovski
2013-04-01 14:15     ` Aleksandar Ristovski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5109E40D.4010208@qnx.com \
    --to=aristovski@qnx.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox