Re: [PATCH] xen/ACPI: Use const char * for string literals

2023-07-14 Thread Jan Beulich
On 14.07.2023 15:10, Andrew Cooper wrote: > For pre-ANSI-C compatibility reasons, string literals have a mutable type, but > it is undefined behaviour to mutate them. > > Swap char *'s to const char *'s for variables which hold string literals. > > This fixes several violations of MISRA Rule 7.4:

Re: [PATCH] xen/ACPI: Use const char * for string literals

2023-07-14 Thread Julien Grall
Hi Andrew, On 14/07/2023 14:10, Andrew Cooper wrote: For pre-ANSI-C compatibility reasons, string literals have a mutable type, but it is undefined behaviour to mutate them. Swap char *'s to const char *'s for variables which hold string literals. This fixes several violations of MISRA Rule 7.

[PATCH] xen/ACPI: Use const char * for string literals

2023-07-14 Thread Andrew Cooper
For pre-ANSI-C compatibility reasons, string literals have a mutable type, but it is undefined behaviour to mutate them. Swap char *'s to const char *'s for variables which hold string literals. This fixes several violations of MISRA Rule 7.4: A string literal shall not be assigned to an objec