From: "Andreas Färber" <andreas.faerber@web.de>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org, patches@linaro.org
Subject: Re: [Qemu-trivial] [PATCH] disas/i386.c: Add explicit braces round empty for-loop body
Date: Sat, 02 Feb 2013 19:34:38 +0100 [thread overview]
Message-ID: <510D5C3E.3040500@web.de> (raw)
In-Reply-To: <1359825474-26661-1-git-send-email-peter.maydell@linaro.org>
Am 02.02.2013 18:17, schrieb Peter Maydell:
> 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>
> ---
> This is the only clang warning on MacOSX apart from the ones about
> deprecated features in audio/coreaudio.c and ui/cocoa.m, which is why
> I think it's worth zapping despite it being a style issue in one of the
> bits of disassembler code we got from binutils and which aren't generally
> in QEMU style.
>
> checkpatch complains about the non-multiple-of-4 indent:
> WARNING: suspect code indent for conditional statements (10, 10)
> #27: FILE: disas/i386.c:4723:
> + for (i = 0; tmp[i] == '0' && tmp[i + 1]; i++) {
> + }
>
> but I didn't see any value in reindenting the whole function just to
> shut it up.
>
> At some point in the 1.5 cycle maybe we could update the code to avoid
> the deprecated MacOS functions and then we could enable warnings-are-errors
> on MacOS too.
On v10.5.8 I'm seeing some redundant declaration warnings from
disas/s390.c and assumed we wouldn't want to fix/workaround the disas
stuff. Same for some exynos4 file.
Also some uninitialized buf2 in the Realtek NIC or so.
And test-thread-pool breaks due to undefined ___sync_fetch_and_add and
___sync_val_compare_and_swap.
With my setup long broken due to pixman, we never made any progress
fixing the main() mess - Stefan W. replaced asprintf in the command line
code but I'd rather get rid of that in some way similar to here:
http://lists.gnu.org/archive/html/qemu-devel/2012-05/msg03983.html
Cheers,
Andreas
WARNING: multiple messages have this Message-ID (diff)
From: "Andreas Färber" <andreas.faerber@web.de>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org, patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH] disas/i386.c: Add explicit braces round empty for-loop body
Date: Sat, 02 Feb 2013 19:34:38 +0100 [thread overview]
Message-ID: <510D5C3E.3040500@web.de> (raw)
In-Reply-To: <1359825474-26661-1-git-send-email-peter.maydell@linaro.org>
Am 02.02.2013 18:17, schrieb Peter Maydell:
> 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>
> ---
> This is the only clang warning on MacOSX apart from the ones about
> deprecated features in audio/coreaudio.c and ui/cocoa.m, which is why
> I think it's worth zapping despite it being a style issue in one of the
> bits of disassembler code we got from binutils and which aren't generally
> in QEMU style.
>
> checkpatch complains about the non-multiple-of-4 indent:
> WARNING: suspect code indent for conditional statements (10, 10)
> #27: FILE: disas/i386.c:4723:
> + for (i = 0; tmp[i] == '0' && tmp[i + 1]; i++) {
> + }
>
> but I didn't see any value in reindenting the whole function just to
> shut it up.
>
> At some point in the 1.5 cycle maybe we could update the code to avoid
> the deprecated MacOS functions and then we could enable warnings-are-errors
> on MacOS too.
On v10.5.8 I'm seeing some redundant declaration warnings from
disas/s390.c and assumed we wouldn't want to fix/workaround the disas
stuff. Same for some exynos4 file.
Also some uninitialized buf2 in the Realtek NIC or so.
And test-thread-pool breaks due to undefined ___sync_fetch_and_add and
___sync_val_compare_and_swap.
With my setup long broken due to pixman, we never made any progress
fixing the main() mess - Stefan W. replaced asprintf in the command line
code but I'd rather get rid of that in some way similar to here:
http://lists.gnu.org/archive/html/qemu-devel/2012-05/msg03983.html
Cheers,
Andreas
next prev parent reply other threads:[~2013-02-02 18:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-02 17:17 [Qemu-trivial] [PATCH] disas/i386.c: Add explicit braces round empty for-loop body Peter Maydell
2013-02-02 17:17 ` [Qemu-devel] " Peter Maydell
2013-02-02 18:34 ` Andreas Färber [this message]
2013-02-02 18:34 ` Andreas Färber
2013-02-02 20:46 ` [Qemu-trivial] " Peter Maydell
2013-02-02 20:46 ` [Qemu-devel] " Peter Maydell
2013-02-18 10:29 ` [Qemu-trivial] " Peter Maydell
2013-02-23 16:49 ` Blue Swirl
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=510D5C3E.3040500@web.de \
--to=andreas.faerber@web.de \
--cc=patches@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.