changeset 9577:11f072108563 draft

(svn r13609) -Codechange: silence warnings about unused variables for gcc2 builds without asserts
author smatz <smatz@openttd.org>
date Sun, 22 Jun 2008 18:44:28 +0000
parents f7872fb68fe5
children b455ef88d6fe
files config.lib
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/config.lib
+++ b/config.lib
@@ -931,6 +931,12 @@
 			# 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