]> git.proxmox.com Git - qemu.git/commitdiff
disas/i386.c: Add explicit braces round empty for-loop body
authorPeter Maydell <peter.maydell@linaro.org>
Sat, 2 Feb 2013 17:17:54 +0000 (17:17 +0000)
committerBlue Swirl <blauwirbel@gmail.com>
Sat, 23 Feb 2013 09:50:03 +0000 (09:50 +0000)
Add explicit braces round an empty for-loop body; this fits
QEMU style and is easier to read than an inconspicuous semicolon
at the end of the line. It also silences a clang warning:

disas/i386.c:4723:49: warning: for loop has empty body [-Wempty-body]
          for (i = 0; tmp[i] == '0' && tmp[i + 1]; i++);
                                                       ^
disas/i386.c:4723:49: note: put the semicolon on a separate line to silence this warning [-Wempty-body]

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
disas/i386.c

index 3b006b13e098dcfddf24b018611ce30f365cac98..dbecf1ffb568a4a174e338b3cab668ffd091fe7b 100644 (file)
@@ -4720,7 +4720,8 @@ print_operand_value (char *buf, size_t bufsize, int hex, bfd_vma disp)
          buf[0] = '0';
          buf[1] = 'x';
           snprintf_vma (tmp, sizeof(tmp), disp);
-         for (i = 0; tmp[i] == '0' && tmp[i + 1]; i++);
+          for (i = 0; tmp[i] == '0' && tmp[i + 1]; i++) {
+          }
           pstrcpy (buf + 2, bufsize - 2, tmp + i);
        }
       else