Skip to content

Commit

Permalink
Merge pull request gcovr#28 from nschum/never-executed-branches
Browse files Browse the repository at this point in the history
Why are branches that are never executed ignored?
  • Loading branch information
whart222 committed Jul 3, 2014
2 parents 9ab8d3f + 6b5ea1d commit 4d0dc4b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scripts/gcovr
Original file line number Diff line number Diff line change
Expand Up @@ -531,10 +531,9 @@ def process_gcov_data(data_fname, covdata, options):
fields = line.split()
try:
count = int(fields[3])
branches.setdefault(lineno, {})[int(fields[1])] = count
except:
# We ignore branches that were "never executed"
pass
count = 0
branches.setdefault(lineno, {})[int(fields[1])] = count
elif tmp.startswith('call'):
pass
elif tmp.startswith('function'):
Expand Down

0 comments on commit 4d0dc4b

Please sign in to comment.