From 6fa1e778a4aec2201cc787ae97fbd38f571ec931 Mon Sep 17 00:00:00 2001 From: Patrick Gartung Date: Mon, 15 Aug 2022 20:41:53 +0200 Subject: [PATCH] Only skip edm::one modules for use of TFileService functions --- Utilities/StaticAnalyzers/scripts/statics.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Utilities/StaticAnalyzers/scripts/statics.py b/Utilities/StaticAnalyzers/scripts/statics.py index fbe3577908989..b88337db38abd 100755 --- a/Utilities/StaticAnalyzers/scripts/statics.py +++ b/Utilities/StaticAnalyzers/scripts/statics.py @@ -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): @@ -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):