Hi list,

I added an option to disable compiler warnings while building ffmpeg. Reason is that when integrating ffmpeg within another project, I would like to disable these warnings since I cannot fix them myself and having them displayed while building the main project is worthless and noisy.

Patch is attached; another solution would be to fix these warnings but I do not feel myself confident about that :-).

Cheers,

Gautier




>From a9e6f6e9e7af8fb791f909b1e19366c1570a29af Mon Sep 17 00:00:00 2001
From: Gautier Pelloux-Prayer <gautier+...@damsy.net>
Date: Thu, 12 Feb 2015 19:53:30 +0100
Subject: [PATCH] Add --disable-warnings option

---
 configure | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/configure b/configure
index 1d14d0a..e28c273 100755
--- a/configure
+++ b/configure
@@ -368,6 +368,7 @@ Developer options (useful when working on FFmpeg itself):
   --enable-debug=LEVEL     set the debug level [$debuglevel]
   --disable-optimizations  disable compiler optimizations
   --enable-extra-warnings  enable more compiler warnings
+  --disable-warnings       disable all compiler warnings
   --disable-stripping      disable stripping of executables and shared libraries
   --assert-level=level     0(default), 1 or 2, amount of assertion testing,
                            2 causes a slowdown at runtime.
@@ -1905,6 +1906,7 @@ CMDLINE_SELECT="
     cross_compile
     debug
     extra_warnings
+    warnings
     logging
     lto
     optimizations
@@ -5334,6 +5336,10 @@ elif enabled_any msvc icl; then
     check_cpp_condition crtversion.h "_VC_CRT_MAJOR_VERSION >= 12" || disable log2
 fi
 
+if disabled warnings; then
+  add_cflags -w
+fi
+
 case $as_type in
     clang)
         add_asflags -Qunused-arguments
-- 
2.1.4

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to