Skip to content

Commit a5bff37

Browse files
committed
clang-tidy: Suppress bitcoin-nontrivial-threadlocal error
/ci_container_base/include/mp/proxy-io.h:637:1: error: Variable with non-trivial destructor cannot be thread_local. [bitcoin-nontrivial-threadlocal,-warnings-as-errors] https://cirrus-ci.com/task/6187773452877824?logs=ci#L4720
1 parent e922bb8 commit a5bff37

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

include/mp/proxy-io.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,10 @@ void ListenConnections(EventLoop& loop, int fd, InitImpl& init)
634634
});
635635
}
636636

637-
extern thread_local ThreadContext g_thread_context;
637+
extern thread_local ThreadContext g_thread_context; // NOLINT(bitcoin-nontrivial-threadlocal)
638+
// Silence nonstandard bitcoin tidy error "Variable with non-trivial destructor
639+
// cannot be thread_local" which should not be a problem on modern platforms, and
640+
// could lead to a small memory leak at worst on older ones.
638641

639642
} // namespace mp
640643

0 commit comments

Comments
 (0)