Uoti Urpala <[email protected]> writes: > On Sat, 2012-08-18 at 12:58 +0200, Diego Biurrun wrote: >> On Fri, Aug 17, 2012 at 07:53:46PM +0200, Anton Khirnov wrote: >> > On Fri, 17 Aug 2012 17:59:08 +0200, Diego Biurrun <[email protected]> wrote: >> > > Adding unused parameters just to match the function pointer signature >> > > feels wrong. Why don't you add another function pointer with matching >> > > signature to the union in cmdutils.h? >> > >> > What exactly feels wrong about it? It looks very right to me. >> > >> > Your suggestion is more code with no benefit. >> >> $attached does not look like more code to me.
It adds code whereas Anton's patch does not. > But your version does not fix the issue. The functions are still > _called_ through the func_arg field. You'd need to change the calling > code to pick the correct field. As is, your patch only adds the new > issue of setting one field in the union (.show) but reading the value > through another (.func_arg). This is not just a cosmetic issue. Calling a function with arguments not matching the definition has undefined behaviour. I think all the functions should be changed to take 3 arguments. That would actually simplify things. -- Måns Rullgård [email protected] _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
