[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.

Rémi Denis-Courmont remi at remlab.net
Tue May 4 10:00:52 CEST 2010


On Tue, 4 May 2010 09:58:04 +0200, Laurent Aimar <fenrir at elivagar.org>
wrote:
> When assert are activated yes, otherwise the function expand to
> static int dummy_callback (vlc_object_t *obj, const ...)
> {
> }
> and then it's normal for the compiler to warn about non returned value.

Fair enough, but I wouldn't like to see "unreachable code" warning in debug
builds either :/

-- 
Rémi Denis-Courmont
http://www.remlab.net
http://fi.linkedin.com/in/remidenis




More information about the vlc-devel mailing list