about summary refs log tree commit diff
path: root/elf/elf.h
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2022-11-03 12:24:17 +0100
committerFlorian Weimer <fweimer@redhat.com>2022-11-03 12:24:17 +0100
commitd33705c0b020632274318323931695a99753b5be (patch)
tree4b8ac6c4486471cefa1def25f66dd651d5a54300 /elf/elf.h
parentee1ada1bdb8074de6e1bdc956ab19aef7b6a7872 (diff)
downloadglibc-d33705c0b020632274318323931695a99753b5be.tar.gz
glibc-d33705c0b020632274318323931695a99753b5be.tar.xz
glibc-d33705c0b020632274318323931695a99753b5be.zip
scripts/glibcelf.py: Properly report <elf.h> parsing failures
Without this change, parse failures result in an exception:

Traceback (most recent call last):
  File "tst-glibcelf.py", line 23, in <module>
    import glibcelf
  File "/path/to/git/scripts/glibcelf.py", line 226, in <module>
    _elf_h = _parse_elf_h()
  File "/path/to/git/scripts/glibcelf.py", line 221, in _parse_elf_h
    result = glibcpp.macro_eval(glibcpp.macro_definitions(tokens), reporter)
  File "/path/to/git/scripts/glibcpp.py", line 379, in macro_eval
    reporter.error(md.line, 'macro {} redefined'.format(md.name))
  File "/path/to/git/scripts/glibcelf.py", line 214, in error
    errors += 1
UnboundLocalError: local variable 'errors' referenced before assignment
Diffstat (limited to 'elf/elf.h')
0 files changed, 0 insertions, 0 deletions