From a26f076a0efd626ebbf614bdba3ba738b9bd2f50 Mon Sep 17 00:00:00 2001 From: Elliot <35050275+apache-hb@users.noreply.github.com> Date: Mon, 11 Mar 2024 14:44:44 -0400 Subject: [PATCH] fix build warnings when compiling with clang-cl --- meson.build | 2 +- public/client/TracyCallstack.cpp | 1 - public/client/TracyProfiler.cpp | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index 9007773b..b8112c05 100644 --- a/meson.build +++ b/meson.build @@ -189,7 +189,7 @@ tracy_public_include_dirs = include_directories('public') compiler = meson.get_compiler('cpp') override_options = [] -if compiler.get_id() != 'msvc' +if compiler.get_id() != 'msvc' and compiler.get_id() != 'clang-cl' override_options += 'cpp_std=c++11' endif diff --git a/public/client/TracyCallstack.cpp b/public/client/TracyCallstack.cpp index e69b5e20..e43f77a9 100644 --- a/public/client/TracyCallstack.cpp +++ b/public/client/TracyCallstack.cpp @@ -439,7 +439,6 @@ void InitCallstack() MODULEINFO info; if( GetModuleInformation( proc, mod[i], &info, sizeof( info ) ) != 0 ) { - const auto base = uint64_t( info.lpBaseOfDll ); char name[1024]; const auto nameLength = GetModuleFileNameA( mod[i], name, 1021 ); if( nameLength > 0 ) diff --git a/public/client/TracyProfiler.cpp b/public/client/TracyProfiler.cpp index ebdc83dc..5e9110c6 100644 --- a/public/client/TracyProfiler.cpp +++ b/public/client/TracyProfiler.cpp @@ -510,7 +510,7 @@ static const char* GetHostInfo() # ifdef __MINGW32__ ptr += sprintf( ptr, "OS: Windows %i.%i.%i (MingW)\n", (int)ver.dwMajorVersion, (int)ver.dwMinorVersion, (int)ver.dwBuildNumber ); # else - ptr += sprintf( ptr, "OS: Windows %i.%i.%i\n", ver.dwMajorVersion, ver.dwMinorVersion, ver.dwBuildNumber ); + ptr += sprintf( ptr, "OS: Windows %lu.%lu.%lu\n", ver.dwMajorVersion, ver.dwMinorVersion, ver.dwBuildNumber ); # endif } #elif defined __linux__