On 31/10/2024 5:11 pm, Luca Fancellu wrote:
> Hi Andrew,
>
>> On 31 Oct 2024, at 16:55, Andrew Cooper wrote:
>>
>> A recent cppcheck run was found to fail:
>>
>> https://gitlab.com/xen-project/people/andyhhp/xen/-/jobs/8237167472
>>
>> with:
>>
>> "type mismatch! call is() before get()" && is()
>> make[3]: *** [arch/x86/boot/Makefile:28:
>> arch/x86/boot/reloc-trampoline.32.o] Error 1
>>
>> This turns out to be a parallel build issue, combined with a recent change to
>> x86. Notably, we now have a case where we build both:
>>
>> CC arch/x86/boot/reloc-trampoline.32.o
>> CC arch/x86/boot/reloc-trampoline.o
>>
>> from the same original C file, and cppcheck uses the source C file as the key
>> for generating it's intermediate files.
>>
>> Switch cppcheck to use the object file as the unique key instead.
>>
>> Fixes: 45bfff651173 ("xen/misra: xen-analysis.py: fix parallel analysis
>> Cppcheck errors")
>> Fixes: db8acf31f96b ("x86/boot: Reuse code to relocate trampoline")
>> Suggested-by: Luca Fancellu
>> Signed-off-by: Andrew Cooper
>> —
> Looks good to me!
> I’ve also checked with and without the patch and I can’t see any regression
> in terms of cppcheck
> issues report.
>
> Reviewed-by: Luca Fancellu
> Tested-by: Luca Fancellu
>
Thanks. I'll get this committed right away.
~Andrew