[vlc-devel] [vlc-commits] src/missing: fix a bunch of clang compilation warnings and update copyright header

Rémi Denis-Courmont remi at remlab.net
Mon Mar 3 19:16:30 CET 2014


Le lundi 3 mars 2014, 19:05:27 Felix Paul Kühne a écrit :
> > The second problem is that unreachable code and missing return value
> > warnings are fundamentally contradictory. We can absolutely not fix both,
> > so for debug builds, we have to choose whether we optimize for stupid or
> > smart SDK's.
> We could do #ifdef __llvm__ :p

It's not that simple. Those warnings are the result of code flow analysis, and 
therefore may vary by compiler version or flags...

For missing.c, it seems really unimportant since most or all of that file is 
usually compiled out, and developers can learn to ignore warnings about it. I 
don't really care either way.

But the same problem affects other files too. For instance:

static void *ThreadFunc(void *data)
{
    /* ... Some stuff here ... */
    for (;;) {
        /* ... Stuff without break statement here ... */
    }

    // To return NULL or not to return NULL ?
}

-- 
Rémi Denis-Courmont
http://www.remlab.net/




More information about the vlc-devel mailing list