base-hw: Define Entry function as noreturn.

Right now the code marks specific instance of this function as noreturn.
It then tries to initialize it using a value that has the same type,
except for the noreturn part. GCC does not care, but clang complains this
technically assigns the value of entry from incompatible pointer type.

Fix this by defining Entry function as no return.

Issue #3938
This commit is contained in:
Piotr Tworek 2020-11-02 00:26:02 +01:00 committed by Christian Helmuth
parent 1643d623e4
commit a892018926

View File

@ -150,9 +150,8 @@ Mapping Platform::_load_elf()
void Platform::start_core(unsigned cpu_id)
{
typedef void (* Entry)(unsigned);
Entry __attribute__((noreturn)) const entry
= reinterpret_cast<Entry>(core_elf.entry());
typedef void (* Entry)(unsigned) __attribute__((noreturn));
Entry const entry = reinterpret_cast<Entry>(core_elf.entry());
entry(cpu_id);
}