Skip to contentSkip to conversation

gqit: enable compiler warnings

PATCH Applied Pavel Roskin 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gqit: enable compiler warnings

The "-O2" flag should be separated from the threading support. Besides, it belongs to CCFLAGS (compile flags common to C and C++), not to CPPFLAGS (preprocessor flags). While at that, enable all warnings by -Wall, except those about non-virtual destructors, which are "inherited" from Qt. Portability is not affected since -O2 was already gcc-specific.

SConstruct +3 -1
index 55fd206..b0b5d0f 100644
@@ -27,8 +27,10 @@ env['ENV']['HOME'] = os.environ['HOME'] 
 
 installDir = env['HOME']+'/bin'
 
+env.Append( CCFLAGS = ['-O2', '-Wall' ,'-Wno-non-virtual-dtor'] )
+
 ## Uncomment the following if you need threading support threading
-env.Append( CPPFLAGS = ['-O2', '-DQT_THREAD_SUPPORT', '-D_REENTRANT', '-I/usr/include/qt3'] )
+env.Append( CPPFLAGS = ['-DQT_THREAD_SUPPORT', '-D_REENTRANT', '-I/usr/include/qt3'] )
 if os.uname()[0] == "FreeBSD":
 	env.Append(LINKFLAGS=["-pthread"])
 
Signature · 2 lines
Regards,
Pavel Roskin
#1 lore raw
Quoted 9 lines · Pavel Roskin

The "-O2" flag should be separated from the threading support. Besides, it belongs to CCFLAGS (compile flags common to C and C++), not to CPPFLAGS (preprocessor flags). While at that, enable all warnings by -Wall, except those about non-virtual destructors, which are "inherited" from Qt. Portability is not affected since -O2 was already gcc-specific.

Thanks applied.

___________________________________ Yahoo! Messenger: chiamate gratuite in tutto il mondo http://it.messenger.yahoo.com