[FFmpeg-devel] Update on lbos
Thu Feb 7 22:08:40 CET 2008
On 02/07/08 12:34 am, Lucabe72 wrote:
> Hi Dave,
>> gcc -Ii:/usr/src/libbrokenos/include -Zomf -fomit-frame-pointer -g -Wall
>> -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls
>> -Wcast-qual -Wwrite-strings -O3 -I"/usr/src/ffmpeg" -I"/usr/src/ffmpeg"
>> -I"/usr/src/ffmpeg"/libavutil -I"/usr/src/ffmpeg"/libavcodec
>> -I"/usr/src/ffmpeg"/libavformat -I"/usr/src/ffmpeg"/libswscale
>> -I"/usr/src/ffmpeg"/libavdevice -D_FILE_OFFSET_BITS=64
>> -D_LARGEFILE_SOURCE -D_ISOC9X_SOURCE -DHAVE_AV_CONFIG_H -c -o ffserver.o
>> In file included from i:/usr/src/libbrokenos/include/unistd.h:1,
>> from ffserver.c:31:
>> i:/usr/src/libbrokenos/include/unistd_orig.h:338: warning: redundant
>> redeclaration of `_exit' in same scope
>> i:/usr/include/stdlib.h:431: warning: previous declaration of `_exit'
> Ok, thanks; these are the information I needed.
> It looks like _exit() is defined both in unistd.h and
There are maybe 20 functions defined in unistd.h and other headers. I
take it this is for backward compatibility (toolkit headers and the old
EMX libc) and hasn't hurt until now. At that not to long ago I
recompiled some source from 1992 without any problems besides warnings
about discontinued CFLAGS.
> I am wondering why you do not see this kind of warnings
> when compiling programs that include both stdlib.h and
Well thanks to the comments from Rich, the problem is narrowed down to
-Wredundant-decls. Removing the CFLAG is one solution though as Michael
points out it is not the best solution as it is nice to catch redundant
declarations in FFmpeg.
So reading the documentation, it seems that -Wredundant-decls represses
warnings from system headers. -Wsystem-headers will override this
according to the documentation.
Anyways the simplest fix is make the headers from libbrokenos into
system headers by using the -Bprefix cflag and sure enough changing
--extra-cflags=-Bi:/usr/src/libbrokenos in configures options gets rid
of warnings about redundant declarations. FFmpeg now compiles fine with
libbrokenos including a working ffserver.
> I'll have a better look this night, when I'll have a better connection.
I'd consider the problem solved with a documentation update
ps the documentation I was reading was for GCC 2.95 so the above should
work with all supported versions of GCC though I've only tested with 3.3.5
More information about the ffmpeg-devel