summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHein-Pieter van Braam <hp@tmm.cx>2019-02-25 00:50:39 +0100
committerGitHub <noreply@github.com>2019-02-25 00:50:39 +0100
commit3d5fc1bb38f8749e27b3f987becf2b92b878323b (patch)
tree1634780206c5658c2d665732288552926600afda
parent0fdcebfbb7cc6934f5a660701718ef838cbeec90 (diff)
parent40cd35489d12c4223a3a9d0d8d80aae5d69d9b3a (diff)
Merge pull request #26161 from marxin/add-Wwrite-strings
Add -Wwrite-strings into all and extra warnings.
-rw-r--r--SConstruct7
1 files changed, 4 insertions, 3 deletions
diff --git a/SConstruct b/SConstruct
index 3734268cae..8ecb17b4e7 100644
--- a/SConstruct
+++ b/SConstruct
@@ -337,17 +337,18 @@ if selected_platform in platform_list:
else: # Rest of the world
disable_nonessential_warnings = ['-Wno-sign-compare']
shadow_local_warning = []
+ all_plus_warnings = ['-Wwrite-strings']
if 'gcc' in os.path.basename(env["CC"]):
version = methods.get_compiler_version(env)
if version != None and version[0] >= '7':
shadow_local_warning = ['-Wshadow-local']
if (env["warnings"] == 'extra'):
- env.Append(CCFLAGS=['-Wall', '-Wextra'] + shadow_local_warning)
+ env.Append(CCFLAGS=['-Wall', '-Wextra'] + all_plus_warnings + shadow_local_warning)
elif (env["warnings"] == 'all'):
- env.Append(CCFLAGS=['-Wall'] + shadow_local_warning + disable_nonessential_warnings)
+ env.Append(CCFLAGS=['-Wall'] + all_plus_warnings + shadow_local_warning + disable_nonessential_warnings)
elif (env["warnings"] == 'moderate'):
- env.Append(CCFLAGS=['-Wall', '-Wno-unused'] + shadow_local_warning + disable_nonessential_warnings)
+ env.Append(CCFLAGS=['-Wall', '-Wno-unused'] + shadow_local_warning + disable_nonessential_warnings)
else: # 'no'
env.Append(CCFLAGS=['-w'])
if (env["werror"]):