[FFmpeg-devel] questions about warnings

John Calcote john.calcote
Fri Jul 16 20:46:57 CEST 2010


Hi list,

I'm building ffmpeg (svn revision 24250) using the following configuration:

$ ../svn/configure --enable-postproc --enable-gpl --enable-x11grab
--enable-pthreads --enable-nonfree --enable-libxvid --enable-libmp3lame
--enable-libvorbis --enable-runtime-cpudetect --enable-libfaac
--extra-cflags='-funit-at-a-time'

$ gcc --version
gcc (SUSE Linux) 4.3.2 [gcc-4_3-branch revision 141291]
...

I'm finding a lot of warnings. (Please don't take this wrong; I'm not
accusing anyone - other than myself - of not managing warnings
properly.) Here's my itemized and categorized list:

deprecation:
   * XXX is deprecated [deprecation attribute - nice compiler feature]
(10 instances)
   * #warning header deprecated (2 instances)

uninitialized usages:
   * XXX may be used uninitialized (40 instances)

array subscript:
   * array subscript is below array bounds (1 instance)

pointer target type:
   * assignment discards qualifiers from pointer target type (17 instances)
   * passing argument X discards qualifiers from pointer target type (8
instances)
   * return discards qualifiers from pointer target type (2 instances)
   * initialization discards qualifiers from pointer target type (1
instance)

incompatible assignments:
   * assignment from incompatible pointer type (4 instances)
   * initialization from incompatible pointer type (18 instances)
   * passing argument X from incompatible pointer type (27 instances)

cast issues:
   * argument makes int from pointer without cast (1 instance)
   * cast from pointer to int of different size (12 instances)
   * cast discards qualifiers from pointer target type (21 instances)

command-line option or attribute override:
   * force_align_arg_pointer attribute ignored (8 instances)

suggestions:
   * suggest parentheses around comparison (9 instances)

For the amount of source code in question, this isn't really that bad. I
just want to make sure I'm not supposed to supply additional config or
make options to remove a chunk of these.

The ones I worry about the most are the array subscript, pointer target
type, incompatible assignments, and cast issues. These are generally the
problem areas when porting - especially from 32- to 64-bit platforms.
I'm also worried about the fact that I had to supply the
--extra-cflags='-funit-at-a-time' option to remove 80 percent of the
warnings I encountered on my first build attempt.

Comments appreciated.

TIA,
John Calcote




More information about the ffmpeg-devel mailing list