This is an automated email from the ASF dual-hosted git repository.
GUIDINGLI pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new fc8f2d52e86 arch/arm64: parenthesize MPU_REGION_ENTRY macro parameters
fc8f2d52e86 is described below
commit fc8f2d52e8625089a88b3f441446af3da8d5400d
Author: pangzhen1 <[email protected]>
AuthorDate: Mon Nov 9 15:28:07 2026 +0800
arch/arm64: parenthesize MPU_REGION_ENTRY macro parameters
Fix MISRA C:2012 Rule 20.7 violations reported by Coverity on
MPU_REGION_ENTRY users: the _name, _base and _size parameters are
now wrapped in parentheses where they expand.
_attr is intentionally left unparenthesized. Every caller passes a
brace-enclosed initializer list (REGION_*_ATTR); wrapping it would
produce a GNU statement expression, which does not compile in a
static initializer. This remaining instance is to be recorded as a
deviation.
Signed-off-by: pangzhen1 <[email protected]>
---
arch/arm64/src/common/arm64_mpu.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/src/common/arm64_mpu.h
b/arch/arm64/src/common/arm64_mpu.h
index 83e0742c2c8..200676a4ae4 100644
--- a/arch/arm64/src/common/arm64_mpu.h
+++ b/arch/arm64/src/common/arm64_mpu.h
@@ -320,9 +320,9 @@ struct arm64_mpu_config
#define MPU_REGION_ENTRY(_name, _base, _size, _attr) \
{ \
- .name = _name, \
- .base = _base, \
- .size = _size, \
+ .name = (_name), \
+ .base = (_base), \
+ .size = (_size), \
.attr = _attr, \
}