Skip to content

Commit

Permalink
Merge pull request #39072 from gartung/gartung-Utilties-StaticAnalyze…
Browse files Browse the repository at this point in the history
…rs-update-statics

Utilities/StaticAnalyzers: Only skip edm::one modules for use of TFileService functions in statics2modules reports.
  • Loading branch information
cmsbuild authored Aug 17, 2022
2 parents 55cef66 + 6fa1e77 commit af34412
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Utilities/StaticAnalyzers/scripts/statics.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

if 'kind' in G[path[len(path)-2]][path[len(path)-1]] and G[path[len(path)-2]][path[len(path)-1]]['kind'] == ' static variable ':
for key in G[tfunc].keys():
if 'kind' in G[tfunc][key] and G[tfunc][key]['kind'] == ' overrides function ' and not key.startswith('edm::one'):
if 'kind' in G[tfunc][key] and G[tfunc][key]['kind'] == ' overrides function ':
print("Non-const static variable \'"+re.sub(farg, "()",
static)+"' is accessed in call stack '", end=' ')
for i in range(0, len(path)-1):
Expand All @@ -74,7 +74,7 @@
print()
else:
for key in G[tfunc].keys():
if 'kind' in G[tfunc][key] and G[tfunc][key]['kind'] == ' overrides function ' and not key.startswith('edm::one'):
if 'kind' in G[tfunc][key] and G[tfunc][key]['kind'] == ' overrides function ' and not (key.startswith('edm::one') and 'TFileService::' in static):
print("Known thread unsafe function \'"+re.sub(farg, "()",
static)+"' is called in call stack '", end=' ')
for i in range(0, len(path)-1):
Expand Down

0 comments on commit af34412

Please sign in to comment.