]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove useless variable int i in backtrace_command_1
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Sat, 19 May 2018 06:54:44 +0000 (08:54 +0200)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Sat, 19 May 2018 06:54:44 +0000 (08:54 +0200)
value of int i was not used in the loop or after the loop.
Pushed as obvious.

gdb/ChangeLog
gdb/stack.c

index 4c213aef6ab545b247481be5cc5a313914eef290..b15d8d11a93b963b0ae45e86687b05e766fb0aee 100644 (file)
@@ -1,3 +1,7 @@
+2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
+
+       * stack.c (backtrace_command_1): Remove useless variable int i.
+
 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
 
        * stack.c (print_frame_info): Fix comment.
index c44423c199b7b61dbc92787666d916661eb7abf7..74c92537da46524d60c072da202731887c4b0d78 100644 (file)
@@ -1696,7 +1696,6 @@ backtrace_command_1 (const char *count_exp, frame_filter_flags flags,
 {
   struct frame_info *fi;
   int count;
-  int i;
   int py_start = 0, py_end = 0;
   enum ext_lang_bt_status result = EXT_LANG_BT_ERROR;
 
@@ -1779,7 +1778,7 @@ backtrace_command_1 (const char *count_exp, frame_filter_flags flags,
          count = -1;
        }
 
-      for (i = 0, fi = trailing; fi && count--; i++, fi = get_prev_frame (fi))
+      for (fi = trailing; fi && count--; fi = get_prev_frame (fi))
        {
          QUIT;