[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] xen/ACPI: Use const char * for string literals
- To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Fri, 14 Jul 2023 16:41:28 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+ycJjRYKhTOmgVstaVaXlN67Fw8yms79dvIGN7wOypY=; b=VdMs46luLzyOo9gFrBdtxdWu1nNrRK5yWJet64L7dmALSi/8nQ/2UDs4NwsPiqjjOKbNnIxm+Rmo332++sjKtZZZL8KUyLj41SaQK+BCBzTw+0UqbmT0DTEcSnA7/bL0KbHIuYMc28AZgWKOdtkcddWqxBKqwWPO1qWB1j8b8E5xLH/FJLQZAmUKvxz3XwUCkFTPsjO1/UBpn6MZGTS9fA+oUOW55aWFIppN/DMC+qR3Rm59TvQZc7/hcLNwtwnLEVQBc2LNPTx9nPx9Zw2BOZ3ufvbVjQRN1aEGCnpje3MYrn27yBuzzMmdHeQKoB/IIu8dJXoW2fqqRxNrkKyQfw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y4znHQR2GriI6rKBJyII27FzlZyRDPP/hx8+QQT+yKzYMtFq8tHV22AhjFnByBtJp7qI0Gcr2CzFtpRezJO/gfqeGdkGAw4A6laUuUuUbcuXRYyktyyEovjVZdCnd3t4nZWQs8fsB3S6dBjxnlZ7fp6VrO3s5I9r7gCnOqn792MchwzjYbkICUuv6qzPuI9w9XNgE7WOuJw1lh1EOJAWpa3iuL9dx1OsEr2GMINlFWDrY1oBqhQn4JpRVvQE7SH9jEGlwp5r0FdZCkSzHnNogW7QMAGk/95EPxPn4LVPaGCweo3JdHr8Rxfw61bL61vZymHiyRQ7dSVuUhv8qqbKSw==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Roberto Bagnara <roberto.bagnara@xxxxxxxxxxx>, Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Fri, 14 Jul 2023 14:42:01 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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:
>
> A string literal shall not be assigned to an object unless the object's type
> is "pointer to const-qualified char".
>
> No functional change.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
|