[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] x86/DMI: adjustments to comply with Misra C:2012 Rule 9.3
On 2023-11-30 15:56, Jan Beulich wrote: On 30.11.2023 08:55, Jan Beulich wrote:The rule demands that all array elements be initialized (or dedicatedinitializers be used). Introduce a small set of macros to allow doing sowithout unduly affecting use sites (in particular in terms of how many elements .matches[] actually has; right now there's no use of DMI_MATCH4(), so we could even consider reducing the array size to 3).Note that DMI_MATCH() needs adjustment because of the comma included inits expansion, which - due to being unparenthesized - would otherwise cause macro arguments in the "further replacement" step to be wrong.Sadly this doesn't work with older gcc (4.8.5 is what I had an issue with,complaining "initializer element is not constant"). Jan Hi,I tried plugging the relevant code into godbolt.org to try gcc-4.8.5, but I'm not able to reproduce the error (see https://godbolt.org/z/cP88YeWhh). Can you please provide some more details on where the issue is? -- Nicola Vetrini, BSc Software Engineer, BUGSENG srl (https://bugseng.com)
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |