[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [XEN PATCH 04/10] xen/public: address violations of MISRA C Rule 20.7
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
- Date: Thu, 29 Feb 2024 17:49:05 +0100
- Cc: sstabellini@xxxxxxxxxx, michal.orzel@xxxxxxx, xenia.ragiadakou@xxxxxxx, ayan.kumar.halder@xxxxxxx, consulting@xxxxxxxxxxx, andrew.cooper3@xxxxxxxxxx, roger.pau@xxxxxxxxxx, bertrand.marquis@xxxxxxx, julien@xxxxxxx, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Thu, 29 Feb 2024 16:49:13 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 2024-02-29 17:40, Jan Beulich wrote:
On 29.02.2024 16:27, Nicola Vetrini wrote:
--- a/xen/include/public/xen.h
+++ b/xen/include/public/xen.h
@@ -988,7 +988,7 @@ typedef struct {
((b) >> 8) & 0xFF, ((b) >> 0) & 0xFF,
\
((c) >> 8) & 0xFF, ((c) >> 0) & 0xFF,
\
((d) >> 8) & 0xFF, ((d) >> 0) & 0xFF,
\
- e1, e2, e3, e4, e5, e6}}
+ (e1), (e2), (e3), (e4), (e5), (e6)}}
Why? Wasn't it agreed already that long macro arguments passed on
(no matter whether to a function, a macro, or like used here) don't
need parenthesizing?
That applies to all outermost macro invocations, but not to the
innermost one. If you want also aggregate initalizers to be deviated,
that could be done (provided that the macro arg is not included in some
expression, such as "{..., e1 + 1, ...}"
--
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl (https://bugseng.com)
|