-Wno-unused-result on GCC (#462)

This commit is contained in:
Fangrui Song 2018-02-19 21:05:46 -08:00 committed by GitHub
parent 40233104a6
commit 84b2187d2a

View File

@ -170,6 +170,8 @@ def configure(ctx):
cxxflags = ['-g', '-Wall', '-Wno-sign-compare', '-Werror']
if ctx.env.CXX_NAME == 'gcc':
cxxflags.append('-Wno-return-type')
# Otherwise (void)write(...) => -Werror=unused-result
cxxflags.append('-Wno-unused-result')
if all(not x.startswith('-std=') for x in ctx.env.CXXFLAGS):
cxxflags.append('-std=c++11')