qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH for-2.9? v2 resend] ipmi: Fix macro issues


From: Corey Minyard
Subject: Re: [Qemu-devel] [PATCH for-2.9? v2 resend] ipmi: Fix macro issues
Date: Thu, 30 Mar 2017 14:10:35 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

On 03/30/2017 12:53 PM, Eric Blake wrote:
On 03/30/2017 12:28 PM, address@hidden wrote:
From: Corey Minyard <address@hidden>

Macro parameters should almost always have () around them when used.
llvm reported an error on this.

Remove redundant parenthesis and put parenthesis around the entire
macros with assignments in case they are used in an expression.

Remove some unused macros.

Reported in https://bugs.launchpad.net/bugs/1651167

Signed-off-by: Corey Minyard <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
---
  hw/ipmi/isa_ipmi_bt.c | 34 ++++++++++++----------------------
  1 file changed, 12 insertions(+), 22 deletions(-)
Already reviewed by me, so now I'm just adding commentary: Is this still
2.9 material?  It silences a build warning under clang, although I
didn't analyze whether the unpatched code actually caused an observable
behavior bug or just compiler noise.

I don't believe the code has a bug, going through all the uses there is
no expression used as a parameter or set used in an expression.

That said, it's also not going to hurt anything and it's nice to silence the
warnings.

-corey




reply via email to

[Prev in Thread] Current Thread [Next in Thread]