aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorMike Sinkovsky <msink@permonline.ru>2017-01-03 14:43:02 +0500
committerJussi Pakkanen <jpakkane@gmail.com>2017-01-03 13:34:39 -0500
commit079e43f70b639c2c4d9ef345bfa916999f3c0508 (patch)
tree480c3c9c6c259c0f430a05cd1d2cc7e5f8d60fe3 /mesonbuild
parentc025c71ae282cfe33e9fe5d8042e5b511808f2de (diff)
downloadmeson-079e43f70b639c2c4d9ef345bfa916999f3c0508.zip
meson-079e43f70b639c2c4d9ef345bfa916999f3c0508.tar.gz
meson-079e43f70b639c2c4d9ef345bfa916999f3c0508.tar.bz2
fix 'unreachable code' warnings
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/compilers.py1
-rw-r--r--mesonbuild/interpreter.py1
-rw-r--r--mesonbuild/scripts/depfixer.py2
3 files changed, 1 insertions, 3 deletions
diff --git a/mesonbuild/compilers.py b/mesonbuild/compilers.py
index 6b90f24..0481ab2 100644
--- a/mesonbuild/compilers.py
+++ b/mesonbuild/compilers.py
@@ -2072,7 +2072,6 @@ def get_gcc_soname_args(gcc_type, prefix, shlib_name, suffix, path, soversion, i
if gcc_type == GCC_STANDARD or gcc_type == GCC_MINGW:
# Might not be correct for mingw but seems to work.
return ['-Wl,-soname,%s%s.%s%s' % (prefix, shlib_name, suffix, sostr)]
- return ['-Wl,-soname,%s%s' % (shlib_name, sostr)]
elif gcc_type == GCC_OSX:
if is_shared_module:
return []
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index eda6f07..b3edba1 100644
--- a/mesonbuild/interpreter.py
+++ b/mesonbuild/interpreter.py
@@ -1787,7 +1787,6 @@ requirements use the version keyword argument instead.''')
if not isinstance(dep, DependencyHolder):
raise InvalidCode('Fallback variable {!r} in the subproject {!r} is '
'not a dependency object.'.format(varname, dirname))
- return None
# Check if the version of the declared dependency matches what we want
if 'version' in kwargs:
wanted = kwargs['version']
diff --git a/mesonbuild/scripts/depfixer.py b/mesonbuild/scripts/depfixer.py
index c9ee36c..193d5b6 100644
--- a/mesonbuild/scripts/depfixer.py
+++ b/mesonbuild/scripts/depfixer.py
@@ -220,7 +220,7 @@ class Elf(DataSizes):
soname = i
if i.d_tag == DT_STRTAB:
strtab = i
- else:
+ if soname is None or strtab is None:
print("This file does not have a soname")
return
self.bf.seek(strtab.val + soname.val)