[vlc-devel] [PATCH] Add dummy return values to silence the?compiler warnings NO RETURN IN NON-VOID function. The compiler can't know?that this function can't reach the end (typically due to for ( ; ; ).?Arguably the compiler should see an assert(), but it keeps on warning?(openSUSE'sBuild System, and possibly others, raise this to an error due to?potentual undefined behaviour due to undefined random data being returned.
Dominique Leuenberger a.k.a DimStar
dimstar at opensuse.org
Tue May 4 13:29:06 CEST 2010
Quoting Laurent Aimar <fenrir at elivagar.org>:
> Hi,
>> Ideally, we would have a unreachable(); macro that would call assert(0),
>> plus disable dead code and missing return value warnings, but I am not sure
>> it is possible at all.
> Well, with the gcc version I have under lenny, I don't have any warnings
> about missing return value for the reported cases.
> But I don't know if it is a regression of gcc or a too old gcc used for the
> reported cases.
The reported cases come from GCC 4.5. Should not be too old :)
Dominique
More information about the vlc-devel
mailing list