[FFmpeg-cvslog] r22091 - in trunk/libavcodec: ivi_common.c ivi_common.h

Michael Niedermayer michaelni
Sun Feb 28 21:25:05 CET 2010


On Sun, Feb 28, 2010 at 07:32:32PM +0100, Reimar D?ffinger wrote:
> On Sun, Feb 28, 2010 at 07:23:37PM +0100, Reimar D?ffinger wrote:
> > On Sun, Feb 28, 2010 at 08:08:05PM +0200, Kostya wrote:
> > > On Sun, Feb 28, 2010 at 06:58:43PM +0100, Michael Niedermayer wrote:
> > > > On Sat, Feb 27, 2010 at 01:12:56PM +0100, kostya wrote:
> > > > > Author: kostya
> > > > > Date: Sat Feb 27 13:12:56 2010
> > > > > New Revision: 22091
> > > > > 
> > > > > Log:
> > > > > Make it clear that ff_ivi_init_static_vlc() does not need arguments
> > > [...]
> > > > 
> > > > can we add this as -Werror= ?
> > > > its a reoccuring mistake that can lead to actual bugs due to lack of
> > > > argument type checking
> > > 
> > > Any theoretical or real-world examples?
> > 
> > #include <stdio.h>
> > void test();
> > int main(void) {
> >     test(12.0);
> > }
> > void test(int arg) {
> >     printf("test got %i\n", arg);
> > }
> > 
> > results in:
> > test got 0
> > 
> > Basically you lose most of the advantages of including the header both where
> > you implement and where you use your function.
> 
> Note that this particular example also has the side-effect of making it
> impossible for gcc to inline the function, even the always_inline attribute
> is ignored - and only if the types mismatch.
> So gcc actually has code that in this case even notices something very special
> goes on, but it does not warn about it.

Garbage Can Compiler

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Dictatorship naturally arises out of democracy, and the most aggravated
form of tyranny and slavery out of the most extreme liberty. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/attachments/20100228/fe047d02/attachment.pgp>



More information about the ffmpeg-cvslog mailing list