[FFmpeg-devel] [PATCH] patcheck: check that pix_fmt etc. initializers are const
Michael Niedermayer
michaelni
Tue Nov 10 00:06:51 CET 2009
On Mon, Nov 09, 2009 at 11:24:00PM +0100, Reimar D?ffinger wrote:
> Hello,
> not much tested I admit, but this hopefully will detect forgotten consts
> while not complaining if someone uses a real variable instead of an
> initializer like e.g. aac does for channel_layouts.
> Index: tools/patcheck
> ===================================================================
> --- tools/patcheck (revision 20469)
> +++ tools/patcheck (working copy)
> @@ -72,6 +72,10 @@
> hiegrep ' *static *'"$ERE_FUNCS"'[^)]*\);' 'static prototype, maybe you should reorder your functions' $*
>
> hiegrep2 '\.long_name *=' 'NULL_IF_CONFIG_SMAL' 'missing NULL_IF_CONFIG_SMAL' $*
> +hiegrep2 '\.pix_fmts *= *(' 'const' 'missing const for pix_fmts array' $*
> +hiegrep2 '\.sample_fmts *= *(' 'const' 'missing const for sample_fmts array' $*
> +hiegrep2 '\.supported_framerates *= *(' 'const' 'missing const for supported_framerates array' $*
> +hiegrep2 '\.channel_layouts *= *(' 'const' 'missing const for channel_layouts array' $*
>
> #egrep $OPT '^\+.*const ' $*| grep -v 'static'> $TMP && printf '\nnon static const\n'
> #cat $TMP
ok
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Democracy is the form of government in which you can choose your dictator
-------------- 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-devel/attachments/20091110/a72580c9/attachment.pgp>
More information about the ffmpeg-devel
mailing list