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 <[email protected]> --- 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
