Fixed #11181 (cppcheckdata.py: handle exception when ctu-info file is missing)
This commit is contained in:
parent
0d9bf03b5c
commit
514278e02b
|
@ -4443,6 +4443,7 @@ class MisraChecker:
|
|||
def is_different_location(loc1, loc2):
|
||||
return loc1['file'] != loc2['file'] or loc1['line'] != loc2['line']
|
||||
|
||||
try:
|
||||
for filename in ctu_info_files:
|
||||
for line in open(filename, 'rt'):
|
||||
if not line.startswith('{'):
|
||||
|
@ -4530,6 +4531,9 @@ class MisraChecker:
|
|||
else:
|
||||
all_usage_files[s['name']] = [s['file']]
|
||||
|
||||
except FileNotFoundError:
|
||||
return
|
||||
|
||||
for ti in all_typedef_info:
|
||||
if not ti['used']:
|
||||
self.reportError(Location(ti), 2, 3)
|
||||
|
|
Loading…
Reference in New Issue