Moev declaration of loop variable outside of the loop.
authorNick Clifton <nickc@redhat.com>
Mon, 13 Jan 2020 17:28:41 +0000 (17:28 +0000)
committerNick Clifton <nickc@redhat.com>
Mon, 13 Jan 2020 17:28:41 +0000 (17:28 +0000)
* objdump.c (disassemble_bytes): Remove C99-ism.

binutils/ChangeLog
binutils/objdump.c

index 863443556d99fd8b3a348315d65068ac540e4b0e..3737672832a3297d125618deab39a229e1592539 100644 (file)
@@ -1,5 +1,6 @@
 2020-01-13  Nick Clifton  <nickc@redhat.com>
 
+       * objdump.c (disassemble_bytes): Remove C99-ism.
        * testsuite/binutils-all/debuginfod.exp: New tests.
 
 2020-01-13  Thomas Troeger  <tstroege@gmx.de>
index a031e9de12291e1d2025f753d92d44aae1e89215..2090f52727033cd746801180adc79e2ae5c00872 100644 (file)
@@ -2623,8 +2623,9 @@ disassemble_bytes (struct disassemble_info * inf,
 
              size_t line_buffer_size = strlen (line_buffer);
              char last_color = 0;
+             size_t i;
 
-             for (size_t i = 0; i <= line_buffer_size; ++i)
+             for (i = 0; i <= line_buffer_size; ++i)
                {
                  if (color_output)
                    {