1*4882a593SmuzhiyunTo enable --disable-Werror for libomxil to avoid some compilers which check code strictly. 2*4882a593Smuzhiyun 3*4882a593SmuzhiyunFor example, at least the following errors happened to some compilers: 4*4882a593Smuzhiyun 5*4882a593Smuzhiyun1) OMX_INDEXTYPE in include/OMX_Index.h IS NOT OMX_INDEXVENDORTYPE in src/base/omx_base_component.h 6*4882a593Smuzhiyun| i586-poky-linux-libtool: compile: i586-poky-linux-gcc -m32 -march=i586 --sysroot=/home/yocto-build5/poky/build/tmp/sysroots/qemux86 -DHAVE_Climinate-unused-debug-types -Wall -Werror -DCONFIG_DEBUG_LEVEL=0 -c OMXComponentRMExt.c -fPIC -DPIC -o .libs/libomxbase_la-OMXComponentRMExt.o 7*4882a593Smuzhiyun| omx_base_component.c: In function 'omx_base_component_GetParameter': 8*4882a593Smuzhiyun| omx_base_component.c:991:3: error: case value '2130706435' not in enumerated type 'OMX_INDEXTYPE' [-Werror=switch] 9*4882a593Smuzhiyun| omx_base_component.c:918:3: error: case value '2130706436' not in enumerated type 'OMX_INDEXTYPE' [-Werror=switch] 10*4882a593Smuzhiyun 11*4882a593Smuzhiyun2) 12*4882a593Smuzhiyun| i586-poky-linux-gcc -m32 -march=i586 --sysroot=/home/yocto-build5/poky/build/tmp/sysroots/qemux86 -DHAVE_CONFIG_H -I. -I.. -DOMXILCOMPOminate-unused-debug-types -Wall -Werror -DCONFIG_DEBUG_LEVEL=0 -c -o omxregister_bellagio-omxregister.o `test -f 'omxregister.c' || echo './'`o 13*4882a593Smuzhiyun| omxregister.c: In function 'buildComponentsList': 14*4882a593Smuzhiyun| omxregister.c:175:7: error: variable 'err' set but not used [-Werror=unused-but-set-variable] 15*4882a593Smuzhiyun| cc1: all warnings being treated as errors 16*4882a593Smuzhiyun 17*4882a593SmuzhiyunUpstream-Status: Inappropriate [configuration] 18*4882a593Smuzhiyun 19*4882a593SmuzhiyunSigned-off-by: Shane Wang <shane.wang@intel.com> 20*4882a593Smuzhiyun 21*4882a593Smuzhiyundiff -r 82d742d3ea90 configure.ac 22*4882a593Smuzhiyun--- a/configure.ac Tue Dec 27 15:30:35 2011 +0800 23*4882a593Smuzhiyun+++ b/configure.ac Tue Dec 27 16:26:03 2011 +0800 24*4882a593Smuzhiyun@@ -5,7 +5,7 @@ 25*4882a593Smuzhiyun AC_PREREQ([2.59]) 26*4882a593Smuzhiyun 27*4882a593Smuzhiyun AC_CONFIG_HEADERS([config.h]) 28*4882a593Smuzhiyun-CFLAGS="${CFLAGS} -Wall -Werror" 29*4882a593Smuzhiyun+CFLAGS="${CFLAGS} -Wall" 30*4882a593Smuzhiyun 31*4882a593Smuzhiyun ################################################################################ 32*4882a593Smuzhiyun # Set the shared versioning info, according to section 6.3 of the libtool info # 33*4882a593Smuzhiyun@@ -122,6 +122,14 @@ 34*4882a593Smuzhiyun [with_android=$enableval], 35*4882a593Smuzhiyun [with_android=no]) 36*4882a593Smuzhiyun 37*4882a593Smuzhiyun+AC_ARG_ENABLE( 38*4882a593Smuzhiyun+ [Werror], 39*4882a593Smuzhiyun+ [AC_HELP_STRING( 40*4882a593Smuzhiyun+ [--disable-Werror], 41*4882a593Smuzhiyun+ [whether to diable treating gcc warnings as errors])], 42*4882a593Smuzhiyun+ [with_Werror=$enableval], 43*4882a593Smuzhiyun+ [with_Werror=yes]) 44*4882a593Smuzhiyun+ 45*4882a593Smuzhiyun ################################################################################ 46*4882a593Smuzhiyun # Check for programs # 47*4882a593Smuzhiyun ################################################################################ 48*4882a593Smuzhiyun@@ -193,6 +201,10 @@ 49*4882a593Smuzhiyun CFG_DEBUG_LEVEL=255 50*4882a593Smuzhiyun fi 51*4882a593Smuzhiyun 52*4882a593Smuzhiyun+if test "x$with_Werror" = "xyes"; then 53*4882a593Smuzhiyun+ CFLAGS="${CFLAGS} -Werror" 54*4882a593Smuzhiyun+fi 55*4882a593Smuzhiyun+ 56*4882a593Smuzhiyun AC_SUBST(CFG_DEBUG_LEVEL) 57*4882a593Smuzhiyun CFLAGS="${CFLAGS} -DCONFIG_DEBUG_LEVEL=$CFG_DEBUG_LEVEL" 58*4882a593Smuzhiyun 59