Index: SConstruct
--- SConstruct.orig
+++ SConstruct
@@ -601,8 +601,8 @@ struct A_%(N)s
 		Cxx20RequiredFeature('std::make_unique_for_overwrite', '''
 #include <memory>
 ''', '''
-	std::make_unique_for_overwrite<int>();
-	std::make_unique_for_overwrite<int[]>(1);
+	(void)std::make_unique_for_overwrite<int>();
+	(void)std::make_unique_for_overwrite<int[]>(1);
 '''),
 		Cxx20RequiredFeature('requires clause', '''
 template <typename T>
@@ -754,8 +754,8 @@ int a_%(N)s = U_%(N)s + 1;
 		Cxx14RequiredFeature('std::make_unique', '''
 #include <memory>
 ''', '''
-	std::make_unique<int>(0);
-	std::make_unique<int[]>(1);
+	(void)std::make_unique<int>(0);
+	(void)std::make_unique<int[]>(1);
 '''),
 		Cxx11RequiredFeature('std::addressof', '''
 #include <memory>
@@ -2254,7 +2254,7 @@ help:assume compiler supports __attribute__((unused))
 		self._check_macro(context,macro_name=macro_name,macro_value=macro_value,test="""
 dxx_compiler_attribute_unused
 static void a(){}
-""", msg='for function __attribute__((unused))', successflags={'CXXFLAGS' : get_Werror_sequence(context.env['CXXFLAGS'], ('-Wunused',))})
+""", msg='for function __attribute__((unused))', successflags={'CXXFLAGS' : ''})
 
 	@_custom_test
 	def check_cxx11_static_assert(self,context,_f='''
@@ -2570,7 +2570,7 @@ $ x86_64-pc-linux-gnu-g++-5.4.0 -x c++ -S -Wformat -o 
 	@_custom_test
 	def check_compiler_useless_cast(self,context):
 		Compile = self.Compile
-		flags = {'CXXFLAGS' : get_Werror_sequence(context.env['CXXFLAGS'], ('-Wuseless-cast',))}
+		flags = {'CXXFLAGS' : ''}
 		if Compile(context, text='''
 /*
  * SDL on Raspbian provokes a warning from -Wuseless-cast
@@ -4882,11 +4882,6 @@ class DXXCommon(LazyObjectConstructor):
 		env = self.env
 		user_settings = self.user_settings
 
-		# Insert default CXXFLAGS.  User-specified CXXFLAGS, if any, are
-		# appended to this list and will override these defaults.  The
-		# defaults are present to ensure that a user who does not set
-		# any options gets a good default experience.
-		env.Prepend(CXXFLAGS = ['-g', '-O2'])
 		# Raspberry Pi?
 		if user_settings.raspberrypi == 'yes':
 			rpi_vc_path = user_settings.rpi_vc_path
