misra: address violation of MISRA C Rule 10.1

Rule 10.1: Operands shall not be of an
inappropriate essential type

The following are non-compliant:
- boolean used as a numeric value.

The result of the '__isleap' macro is a boolean.
Suppress analyser tool finding.

The result of 'NOW() > timeout' is a boolean,
which is compared to a numeric value. Fix this.
Regression was introdiced by commit:
be7f047e08 (xen/arm: smmuv3: Replace linux functions with xen functions.)

Remove pointless cast '(const unsigned short int *)'.
The source array and the destination pointer are both of the same type.

Signed-off-by: Dmytro Prokopchuk <dmytro_prokopchuk1@epam.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
Dmytro Prokopchuk1 authored and Stefano Stabellini committed 2025-07-16 17:42:22 -07:00
1 parent 34317c5082
commit 2c5b7446a7
3 files changed
+11 -2

No files matched your search

+8
View File
@@ -116,6 +116,14 @@
},
{
"id": "SAF-14-safe",
"analyser": {
"eclair": "MC3A2.R10.1"
},
"name": "Rule 10.1: use boolean as an array index",
"text": "Using a boolean type as an array index is safe."
},
{
"id": "SAF-15-safe",
"analyser": {},
"name": "Sentinel",
"text": "Next ID to be used"
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.