From: Thomas Huth <thuth@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
Peter Feiner <pfeiner@google.com>,
kvm@vger.kernel.org, drjones@redhat.com
Subject: Re: [PATCH kvm-unit-tests] build: enable -Werror
Date: Fri, 4 Mar 2016 10:00:04 +0100 [thread overview]
Message-ID: <56D94E94.6080509@redhat.com> (raw)
In-Reply-To: <56D94C34.7010807@redhat.com>
On 04.03.2016 09:49, Paolo Bonzini wrote:
>
>
> On 04/03/2016 09:47, Thomas Huth wrote:
>>>> asm volatile("mov %%dr7,%0" : "=r" (dr7));
>>>> debugctl = rdmsr(MSR_IA32_DEBUGCTLMSR);
>>>> /* Commented out: KVM does not support DEBUGCTL so far */
>>>> + assert(debugctl == debugctl);
>>>> report("Guest=host debug controls", dr7 == 0x402 /* && debugctl == 0x1 */);
>> Now these assert()s are really ugly. Wouldn't it be better do comment
>> out the "debugctl = rdmsr(MSR_IA32_DEBUGCTLMSR);" line instead?
>
> This also looks better than the asserts:
>
> (void)debugctl;
>
> Thomas, if you're okay with it I can do the change locally.
I personally would rather prefer to put comments around "debugctl =",
but your suggestion looks at least better to me than the solution with
assert() ... (since assert() can also be #undef in normal C projects, so
IMHO it should not be used for something that has influence on the
behavior of the normal C code).
Thomas
next prev parent reply other threads:[~2016-03-04 9:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-03 21:55 [PATCH kvm-unit-tests] build: enable -Werror Peter Feiner
2016-03-04 8:47 ` Thomas Huth
2016-03-04 8:49 ` Paolo Bonzini
2016-03-04 9:00 ` Thomas Huth [this message]
2016-03-04 16:57 ` Peter Feiner
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=56D94E94.6080509@redhat.com \
--to=thuth@redhat.com \
--cc=drjones@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=pfeiner@google.com \
/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.