summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authormarxin <mliska@suse.cz>2019-02-12 21:10:08 +0100
committerRĂ©mi Verschelde <rverschelde@gmail.com>2019-02-20 19:44:12 +0100
commit8d51618949d5ea8a94e0f504401e8f852a393968 (patch)
tree6c0ab829b02aba47ff3dc27b9a14d3c3a0658a3b /platform
parent132e2f458df7a3551a251d68afeccd0362ca6be2 (diff)
Add -Wshadow=local to warnings and fix reported issues.
Fixes #25316.
Diffstat (limited to 'platform')
-rw-r--r--platform/android/export/export.cpp4
-rw-r--r--platform/x11/detect.py19
2 files changed, 8 insertions, 15 deletions
diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp
index 60cc33e6bf..9d9270bdac 100644
--- a/platform/android/export/export.cpp
+++ b/platform/android/export/export.cpp
@@ -301,10 +301,10 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
args.push_back(d.id);
args.push_back("shell");
args.push_back("getprop");
- int ec;
+ int ec2;
String dp;
- OS::get_singleton()->execute(adb, args, true, NULL, &dp, &ec);
+ OS::get_singleton()->execute(adb, args, true, NULL, &dp, &ec2);
Vector<String> props = dp.split("\n");
String vendor;
diff --git a/platform/x11/detect.py b/platform/x11/detect.py
index 72139538b7..16760f9407 100644
--- a/platform/x11/detect.py
+++ b/platform/x11/detect.py
@@ -2,7 +2,7 @@ import os
import platform
import sys
from compat import decode_utf8
-
+from methods import get_compiler_version
def is_active():
return True
@@ -161,18 +161,11 @@ def configure(env):
env.Append(CCFLAGS=['-pipe'])
env.Append(LINKFLAGS=['-pipe'])
- # Check for gcc version > 5 before adding -no-pie
- import re
- import subprocess
- proc = subprocess.Popen([env['CXX'], '--version'], stdout=subprocess.PIPE)
- (stdout, _) = proc.communicate()
- stdout = decode_utf8(stdout)
- match = re.search('[0-9][0-9.]*', stdout)
- if match is not None:
- version = match.group().split('.')
- if (version[0] > '5'):
- env.Append(CCFLAGS=['-fpie'])
- env.Append(LINKFLAGS=['-no-pie'])
+ # Check for gcc version >= 6 before adding -no-pie
+ version = get_compiler_version(env)
+ if version != None and version[0] > '6':
+ env.Append(CCFLAGS=['-fpie'])
+ env.Append(LINKFLAGS=['-no-pie'])
## Dependencies