From 1439e93a698c02c4ea13a141ffd9a1798a455ff9 Mon Sep 17 00:00:00 2001 From: mwl4 Date: Wed, 25 Jan 2023 15:11:49 +0100 Subject: [PATCH] Fix compilation on linux: always initialize ScopedZone::m_connectionId to 0. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gcc error: public/tracy/../client/TracyScoped.hpp:102:9: error: ‘___tracy_scoped_zone.tracy::ScopedZone::m_connectionId’ may be used uninitialized in this function [-Werror=maybe-uninitialized] if( GetProfiler().ConnectionId() != m_connectionId ) return; ^~ --- public/client/TracyScoped.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/client/TracyScoped.hpp b/public/client/TracyScoped.hpp index 55859107..bc130791 100644 --- a/public/client/TracyScoped.hpp +++ b/public/client/TracyScoped.hpp @@ -166,7 +166,7 @@ private: const bool m_active; #ifdef TRACY_ON_DEMAND - uint64_t m_connectionId; + uint64_t m_connectionId = 0; #endif };