From deeebc093309fe5bd14b3513f4ce10f46aa845df Mon Sep 17 00:00:00 2001 From: Karlheinz Friedberger Date: Tue, 8 Dec 2020 13:48:53 +0100 Subject: [PATCH] disable warning about repeated thread creation. Creating threads with the same identifier is allowed on different branches or if the previous thread already terminated and freed the used identifier. --- lint/witnesslint/linter.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lint/witnesslint/linter.py b/lint/witnesslint/linter.py index f43a2dd..0ce23ec 100644 --- a/lint/witnesslint/linter.py +++ b/lint/witnesslint/linter.py @@ -461,10 +461,11 @@ def handle_edge_data(self, data, key, parent): elif key == witness.CREATETHREAD: self.witness.thread_creations.add(data.text) if data.text in self.witness.threads: - logging.warning( - "Thread with id {} has already been created".format(data.text), - data.sourceline, - ) + # logging.warning( + # "Thread with id {} has already been created".format(data.text), + # data.sourceline, + # ) + pass else: self.witness.threads[data.text] = None elif self.witness.defined_keys.get(key) == witness.EDGE: