Skip to content

Commit

Permalink
Merge pull request godotengine#27868 from marxin/add-more-warnings
Browse files Browse the repository at this point in the history
Add more warnings on top of -Wall and -Wextra.
  • Loading branch information
hpvb authored Apr 23, 2019
2 parents 05ef1f4 + 4134f9e commit 4068e79
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -347,11 +347,18 @@ if selected_platform in platform_list:

if (env["warnings"] == 'extra'):
# FIXME: enable -Wclobbered once #26351 is fixed
# FIXME: enable -Wlogical-op and -Wduplicated-branches once #27594 is merged
# Note: enable -Wimplicit-fallthrough for Clang (already part of -Wextra for GCC)
# once we switch to C++11 or later (necessary for our FALLTHROUGH macro).
env.Append(CCFLAGS=['-Wall', '-Wextra', '-Wno-unused-parameter'] + all_plus_warnings + shadow_local_warning)
env.Append(CCFLAGS=['-Wall', '-Wextra', '-Wno-unused-parameter',
'-Wctor-dtor-privacy', '-Wnon-virtual-dtor']
+ all_plus_warnings + shadow_local_warning)
if methods.using_gcc(env):
env['CCFLAGS'] += ['-Wno-clobbered']
env['CCFLAGS'] += ['-Wno-clobbered', '-Walloc-zero', '-Wnoexcept',
'-Wduplicated-cond', '-Wplacement-new=1', '-Wstringop-overflow=4']
version = methods.get_compiler_version(env)
if version != None and version[0] >= '9':
env['CCFLAGS'] += ['-Wattribute-alias=2']
elif (env["warnings"] == 'all'):
env.Append(CCFLAGS=['-Wall'] + shadow_local_warning)
elif (env["warnings"] == 'moderate'):
Expand Down

0 comments on commit 4068e79

Please sign in to comment.