[vlc-devel] [PATCH] Have the function return a value, as it's a non-void function.
Rémi Duraffort
ivoire at via.ecp.fr
Mon Dec 29 18:07:07 CET 2008
> > > 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;
> > > }
The return value expected is a pointer to void and not an integer. That's
why returning VLC_SUCCESS is wrong. If we do get the retun value, we expect
it to be a pointer so if this pointer is not NULL we will dereference
it. With your patch it will segfault because your pointer point to
nothing we can access.
But you'r right we have to return something, in this case only NULL is
acceptable.
Best regards
--
ivoire | Rémi Duraffort
More information about the vlc-devel
mailing list