[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 4/9] ACPI: address violations of MISRA C:2012 Rule 11.8
From: Maria Celeste Cesario <maria.celeste.cesario@xxxxxxxxxxx> The xen sources contain violations of MISRA C:2012 Rule 11.8 whose headline states: "A conversion shall not remove any const, volatile or _Atomic qualification from the type pointed to by a pointer". Add missing const qualifiers missing in casting. There's no reason to drop the const qualifier in ACPI_COMPARE_NAME since the macro arguments are not modified in its body. Signed-off-by: Maria Celeste Cesario <maria.celeste.cesario@xxxxxxxxxxx> Signed-off-by: Simone Ballarin <simone.ballarin@xxxxxxxxxxx> --- xen/include/acpi/acmacros.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/include/acpi/acmacros.h b/xen/include/acpi/acmacros.h index 86c503c20f..d7c74c5769 100644 --- a/xen/include/acpi/acmacros.h +++ b/xen/include/acpi/acmacros.h @@ -116,7 +116,7 @@ #define ACPI_PTR_TO_PHYSADDR(i) ACPI_TO_INTEGER(i) #ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED -#define ACPI_COMPARE_NAME(a,b) (*ACPI_CAST_PTR (u32,(a)) == *ACPI_CAST_PTR (u32,(b))) +#define ACPI_COMPARE_NAME(a,b) (*ACPI_CAST_PTR (const u32,(a)) == *ACPI_CAST_PTR (const u32,(b))) #else #define ACPI_COMPARE_NAME(a,b) (!ACPI_STRNCMP (ACPI_CAST_PTR (char,(a)), ACPI_CAST_PTR (char,(b)), ACPI_NAME_SIZE)) #endif -- 2.40.0
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |