[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] public: constify xsd_errors[]
- To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Mon, 4 Jul 2022 14:53:44 +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=G8Y8mDwtxmAxBw6f4NNMJLRFjn71RGDhvL1Mi6KMwb4=; b=S5oNoCPk9362sHvagn8fsVf8uCqbU+Est/bEt9/N404V5k1+YfUOOrFv3cLSlvtNyF7ZzGhQuO2zvLP6xgeMbLc1abcSmd74S6reFROh4qQKIDRJ1aGG8pAeeAlAjvbp81IKWkM+tkS7D1y1T4vWlHX/3VwUvQxh2pMW2na/CqPmGX6cv/jL+Na+4HeMR7B6D0veG7R9O2f4ABENPYzHHBj2INrklvzN2dbO5gC2a7hj89n83gg5QPR9T1fu8EdJqAqlFDTNnUPTjTus982XlxdCKjfmUKIn1u0yL4W3s4DmzCfcOmlCrXHf1BYbzEoLXa5MifjrdVoLVW5IwkBQtA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ac2XqLyGVhBpRcAva759Eolczr0tsuUonk7HyjiDBCBnKFug4DMEnaFiZKkAfsegIJKtvybaMBy9evr5z0bZtKmMGPJzEFINLesuwaJwKACJTKvzPRuH2E32jqgMCf+KCO5Uvd/a4Sq3J9hGLxw1651wJxiEYNoAU1feIA+FgKVGTC8uNvToeFIm+aK6J4DLWKAng5OxgP6oXE67x1ScljO5zfyB0WvIJ63Wwm5Ta1h9oixn358L1V+QOeMaN+1t3rzvxEeNPz8IDR6ja9i6U6gqbkboO0d8Qct6p6Ffru5cXhcCgroZyI3oLpK482vEBQT6lZiA37uYcb+4pkcHNA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Juergen Gross <jgross@xxxxxxxx>
- Delivery-date: Mon, 04 Jul 2022 12:53:58 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
While in principle this could break existing users, I think such users
deserve to be put in trouble. After all the table should have been const
from the very beginning.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
Especially since the table definition lives in a header, the adding of
"const" might render redundant the adding of the "unused" attribute. But
I'm not sufficiently certain that all supported gcc versions as well as
compilers claiming gcc compatibility behave consistently in this regard,
so I'm leaving the attribute in place.
--- a/xen/include/public/io/xs_wire.h
+++ b/xen/include/public/io/xs_wire.h
@@ -71,7 +71,7 @@ struct xsd_errors
#ifdef EINVAL
#define XSD_ERROR(x) { x, #x }
/* LINTED: static unused */
-static struct xsd_errors xsd_errors[]
+static const struct xsd_errors xsd_errors[]
#if defined(__GNUC__)
__attribute__((unused))
#endif
|