Merge pull request #2070 from mesonbuild/lgtmfixex

Static analyzer fixes
pull/2073/head
Jussi Pakkanen 7 years ago committed by GitHub
commit f77c3176ab
  1. 1
      mesonbuild/backend/xcodebackend.py
  2. 1
      mesonbuild/dependencies/ui.py
  3. 12
      mesonbuild/interpreter.py
  4. 2
      mesonbuild/scripts/depfixer.py
  5. 1
      mesonbuild/scripts/vcstagger.py
  6. 1
      tools/ac_converter.py
  7. 1
      tools/cmake2meson.py

@ -483,7 +483,6 @@ class XCodeBackend(backends.Backend):
% (self.buildconflistmap[tname], tname))
self.write_line('buildPhases = (')
self.indent_level += 1
t = self.build.targets[tname]
for bpname, bpval in t.buildphasemap.items():
self.write_line('%s /* %s yyy */,' % (bpval, bpname))
self.indent_level -= 1

@ -390,7 +390,6 @@ class SDL2Dependency(ExternalDependency):
return
except Exception as e:
mlog.debug('SDL 2 not found via pkgconfig. Trying next, error was:', str(e))
pass
if DependencyMethods.SDLCONFIG in self.methods:
sdlconf = shutil.which('sdl2-config')
if sdlconf:

@ -2007,9 +2007,6 @@ class Interpreter(InterpreterBase):
raise DependencyException(m.format(name))
dep = cached_dep
else:
# We need to actually search for this dep
exception = None
dep = None
# If the dependency has already been configured, possibly by
# a higher level project, try to use it first.
if 'fallback' in kwargs:
@ -2022,13 +2019,15 @@ class Interpreter(InterpreterBase):
except KeyError:
pass
# We need to actually search for this dep
exception = None
dep = None
# Search for it outside the project
if not dep:
try:
dep = dependencies.find_external_dependency(name, self.environment, kwargs)
except DependencyException as e:
exception = e
pass
# Search inside the projects list
if not dep or not dep.found():
@ -2809,11 +2808,8 @@ different subdirectory.
found = self.check_contains(element, args)
if found:
return True
try:
if element == item:
return True
except Exception:
pass
return False
def is_subproject(self):

@ -337,7 +337,7 @@ def run(args):
print('This application resets target rpath.')
print('Don\'t run this unless you know what you are doing.')
print('%s: <binary file> <prefix>' % sys.argv[0])
exit(1)
sys.exit(1)
with Elf(args[0]) as e:
if len(args) == 1:
e.print_rpath()

@ -36,6 +36,7 @@ def run(args):
infile, outfile, fallback, source_dir, replace_string, regex_selector = args[0:6]
command = args[6:]
config_vcs_tag(infile, outfile, fallback, source_dir, replace_string, regex_selector, command)
return 0
if __name__ == '__main__':
sys.exit(run(sys.argv[1:]))

@ -39,7 +39,6 @@ function_data = \
'HAVE_POSIX_MEMALIGN': ('posix_memalign', 'stdlib.h'),
'HAVE_SIGACTION': ('sigaction', 'signal.h'),
'HAVE_ALARM': ('alarm', 'unistd.h'),
'HAVE_CLOCK_GETTIME': ('clock_gettime', 'time.h'),
'HAVE_CTIME_R': ('ctime_r', 'time.h'),
'HAVE_DRAND48': ('drand48', 'stdlib.h'),
'HAVE_FLOCKFILE': ('flockfile', 'stdio.h'),

@ -74,7 +74,6 @@ class Lexer:
lineno += 1
col = 1
line_start = mo.end()
pass
elif tid == 'varexp':
yield(Token('varexp', match_text[2:-1]))
else:

Loading…
Cancel
Save