# HG changeset patch # User smatz # Date 2008-06-22 18:44:28 # Node ID 5dca971975cf0d1a76af884aeecb551c483ba41c # Parent 65e400bfeb96b1e15ab56e27fa61d985b837fe61 (svn r13609) -Codechange: silence warnings about unused variables for gcc2 builds without asserts diff --git a/config.lib b/config.lib --- a/config.lib +++ b/config.lib @@ -931,6 +931,12 @@ make_cflags_and_ldflags() { # Make sure we mark GCC 2.95 flag for Makefile.src.in, as we # need a lovely hack there to make it compile correctly. gcc295="1" + + # Disable warnings about unused variables when + # compiling with asserts disabled + if [ $enable_assert -eq 0 ]; then + CFLAGS="$CFLAGS -Wno-unused" + fi fi if [ $cc_version -ge 30 ]; then