mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
25 lines
424 B
Python
25 lines
424 B
Python
|
|
from __future__ import print_function
|
|
import sys
|
|
|
|
def bar(cond):
|
|
if cond:
|
|
fail("cond true")
|
|
|
|
|
|
def fail(message, *args):
|
|
print('Error:', message % args, file=sys.stderr)
|
|
sys.exit(1)
|
|
|
|
def foo(cond):
|
|
bar()
|
|
|
|
# To get the FP result reported in ODASA-6418,
|
|
#bar must be called directly (not transitively) from the module scope
|
|
bar(unknown())
|
|
|
|
#The following do not trigger the bug
|
|
#foo(unknown())
|
|
#pass
|
|
|