[FFmpeg-devel] [PATCH] Silence useless icc warnings
Carl Eugen Hoyos
cehoyos
Sun May 11 13:41:19 CEST 2008
Hi!
M?ns Rullg?rd <mans <at> mansr.com> writes:
> > +# add some flags for Intel C Compiler
> > +if `$cc --version |grep -q Intel`; then
>
> I prefer the $(command) syntax, and the command could use a little
> whitespace cosmetics.
I saw that other similar checks just use if command; I hope that's better now.
> > + # Just warnings, no remarks
> > + check_cflags -w1
> > + # -wd: Disable following warnings
> > + # 144, 167, 556: -Wno-pointer-sign
> > + # 10006: ignoring unknown option -fno-signed-zeros
> > + # 10156: ignoring option '-W'; no argument required
> > + check_cflags -wd144,167,556,10006,10156
> > + # 11030: ignoring option '-export'; no argument required
> > + check_ldflags -wd10156,11030
>
> Wouldn't it be better to not pass those options in the first place?
I prepared a patch not to pass the warning options (again inlined, sorry) and
fix one of my comments, in case it's ok, there will be a moving of check_cflags
-Wall first, then the patch, then another cosmetic commit.
Please comment, Carl Eugen
Index: configure
===================================================================
--- configure (revision 13113)
+++ configure (working copy)
@@ -1784,8 +1784,19 @@
enabled debug && add_cflags -g"$debuglevel"
# add some useful compiler flags if supported
+check_cflags -Wall
+if $cc --version | grep -q Intel; then
+ # Just warnings, no remarks
+ check_cflags -w1
+ # -wd: Disable following warnings
+ # 144, 167, 556: -Wno-pointer-sign
+ # 10006: ignoring unknown option -fno-signed-zeros
+ check_cflags -wd144,167,556,10006
+ # 10156: ignoring option '-export'; no argument required
+ # 11030: Warning unknown option --as-needed
+ check_ldflags -wd10156,11030
+else
check_cflags -Wdeclaration-after-statement
-check_cflags -Wall
check_cflags -Wno-switch
check_cflags -Wdisabled-optimization
check_cflags -Wpointer-arith
@@ -1795,6 +1806,7 @@
check_cflags -Wwrite-strings
check_cflags -Wtype-limits
enabled extra_warnings && check_cflags -Winline
+fi
# add some linker flags
check_ldflags -Wl,--warn-common
More information about the ffmpeg-devel
mailing list