aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2013-02-02 17:17:54 +0000
committerBlue Swirl <blauwirbel@gmail.com>2013-02-23 09:50:03 +0000
commitaf18078d8057203b1ed26ac5534d233aabb36886 (patch)
treef6d9afa2cb7d2e181c7af88ec2b4f5805c89d2fd
parent632314c49ce20ee9c974f07544d9125fbbbfbe1b (diff)
disas/i386.c: Add explicit braces round empty for-loop body
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>
-rw-r--r--disas/i386.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/disas/i386.c b/disas/i386.c
index 3b006b13e0..dbecf1ffb5 100644
--- a/disas/i386.c
+++ b/disas/i386.c
@@ -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