[vlc-devel] [PATCH] Have the function return a value, as it's a non-void function.

Dominique Leuenberger dominique at leuenberger.net
Mon Dec 22 21:02:27 CET 2008

On Mon, 2008-12-22 at 21:15 +0200, Rémi Denis-Courmont wrote:
> Le lundi 22 décembre 2008, Dominique Leuenberger a écrit :
> > diff --git a/modules/video_filter/atmo/atmo.cpp
> > b/modules/video_filter/atmo/atmo.cpp index 7a9d02d..90c9091 100644
> > --- a/modules/video_filter/atmo/atmo.cpp
> > +++ b/modules/video_filter/atmo/atmo.cpp
> > @@ -1825,6 +1825,7 @@ static void *FadeToColorThread(vlc_object_t
> > *obj) /* call indirect to OleUnitialize() for this thread */
> >      AtmoFinalize(p_fadethread->p_filter, 0);
> >      vlc_restorecancel (canc);
> > +    return VLC_SUCCESS;
> >  }
> You are now on my crap list, which means I won't be looking at any of 
> your patch for a week. You are obviously not testing them (as in not 
> even checking the compiler output).

Oh, just to make it clear: THIS is the output of the compiler while
passing through atmo.cpp:

make[6]: Entering directory
/bin/sh ../../../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H
-I. -I../../..   -I../../../include -I../../../includ
e  -DSYS_LINUX `top_builddir="../../.." ../../../vlc-config --cxxflags
plugin libatmo_plugin_la-atmo.lo` -march=i586 -mtune=i
686 -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector
-funwind-tables -fasynchronous-unwind-tables -c -o lib
atmo_plugin_la-atmo.lo `test -f 'atmo.cpp' || echo './'`atmo.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../include
-I../../../include -DSYS_LINUX -D_FILE_OFFSET_BITS=6
o -DMODULE_NAME_IS_atmo -DMODULE_STRING=\"atmo\" -O3 -ffast-math
-funroll-loops -mtune=pentium2 -fomit-frame-pointer -march=i
586 -mtune=i686 -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2
-fstack-protector -funwind-tables -fasynchronous-unwind-tabl
es -c atmo.cpp  -fPIC -DPIC -o .libs/libatmo_plugin_la-atmo.o
In file included from ../../../include/vlc_common.h:866,
from atmo.cpp:37:
../../../include/vlc_variables.h: In function 'void
__var_AssertType(vlc_object_t*, const char*, int)':
../../../include/vlc_variables.h:202: warning: unused variable 'i_type'
atmo.cpp: In function 'void Atmo_SetupParameters(filter_t*)':
atmo.cpp:988: warning: unused variable 'psz_path'
atmo.cpp: In function 'void* FadeToColorThread(vlc_object_t*)':
atmo.cpp:1811: warning: call to 'harmful_delay' declared with attribute
warning: use proper event handling instead of short d
AtmoDefs.h: At global scope:
AtmoDefs.h:92: warning: 'AtmoDeviceTypes' defined but not used

NONE of those warnings are NEW or introduced by my patch. On the other
hand another warning regarding random data returned was removed.

I feel really sorry for not being such a bright mind when it comes to
coding as you!


More information about the vlc-devel mailing list