[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [qemu-s390x] [Qemu-devel] [PATCH] s390x: Add missing QEMU_NORETURN a
Re: [qemu-s390x] [Qemu-devel] [PATCH] s390x: Add missing QEMU_NORETURN attribute (CID 1383842)
Sun, 17 Dec 2017 18:07:40 +0100
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0
On 17.12.2017 11:58, Stefan Weil wrote:
> Am 17.12.2017 um 11:25 schrieb address@hidden:
>> This series failed build test on s390x host. Please find the details below.
>> /var/tmp/patchew-tester-tmp-e2qiwzsb/src/target/s390x/interrupt.c: In
>> function ‘s390_program_interrupt’:
>> error: ‘noreturn’ function does return [-Werror]
> Obviously the s390x compiler does more checks than my x86 gcc.
> To fix the new warning, QEMU_NORETURN would have to be added to
> kvm_s390_program_interrupt and tcg_s390_program_interrupt, too.
> I am not sure about kvm_s390_program_interrupt. Is it a function which
> will never return? Then the current code (which includes a return
> statement in kvm_s390_vcpu_interrupt) is not correct.
kvm_s390_program_interrupt() returns, so adding a QEMU_NORETURN to that
function is not a good idea.
> We could also move the g_assert_not_reached in s390_program_interrupt to
> the end of the function. That should satisfy the compiler as well.
That also does not work since kvm_s390_program_interrupt() returns.
> Or we could suppress the s390x compiler warning by using a compiler
> pragma. But I don't like that alternative.
I think the best solution would be to call tcg_s390_program_interrupt()
directly from helper_divs64() instead of going through the
s390_program_interrupt() wrapper. helper_divs64() is for TCG only, so it
should be fine to directly use the tcg_s390_program_interrupt() function
Re: [qemu-s390x] [Qemu-devel] [PATCH] s390x: Add missing QEMU_NORETURN attribute (CID 1383842), no-reply, 2017/12/20