Several corrections to make sure code compiles with gcc and doesn't generate warnings

Change-Id: I63e72ba724233953e9f36b11eca37070d6e06372
diff --git a/wscript b/wscript
index 47255a6..084d764 100644
--- a/wscript
+++ b/wscript
@@ -55,10 +55,12 @@
 
     if conf.options.debug:
         conf.define ('_DEBUG', 1)
-        conf.env.append_value('CXXFLAGS', ['-O0', '-Wall', '-Wno-unused-variable',
-                                           '-fcolor-diagnostics', '-g3', '-Qunused-arguments'])
+        conf.env.append_value('CXXFLAGS', ['-O0', '-Wall', '-Wno-unused-variable', '-g3'])
     else:
-        conf.env.append_value('CXXFLAGS', ['-O3', '-g', '-Qunused-arguments'])
+        conf.env.append_value('CXXFLAGS', ['-O3', '-g'])
+
+    if conf.env["CXX"] == ["clang++"]:
+        conf.env.append_value('CXXFLAGS', ['-fcolor-diagnostics', '-Qunused-arguments'])
 
     if conf.options._test:
         conf.define ('_TESTS', 1)