[FFmpeg-devel] [PATCH] deals with code that has no effect when executed

Erik Hovland erik
Thu May 29 21:02:15 CEST 2008

On Thu, May 29, 2008 at 08:20:27PM +0200, Reimar D?ffinger wrote:
> On Thu, May 29, 2008 at 10:57:22AM -0700, Erik Hovland wrote:
> > All of the memset calls rely on the compiler to sizeof the array. If
> > a compiler does this then it is outside of the C standard.
> I'd really like a citation of the C standard for that claim...

I guess I should do a better job of qualifying that statement. The C
standard does not allow for the sizeof operator to work on dynamic or
externally define types.

The calls in question break this rule even when they assign a pointer to
a statically allocated array and then do a sizeof that pointer.

If you prefer I will rework the patch so that it uses the static array
whenever possible.

I have made the other changes in my patch that you suggest and I will
submit a new patch after I hear how you would like me to proceed.


Erik Hovland
mail: erik at hovland.org
web: http://hovland.org/
PGP/GPG public key available on request

More information about the ffmpeg-devel mailing list