From 683c17574ab3c2df7891428ce23eac78332526a3 Mon Sep 17 00:00:00 2001 From: Awais Belal Date: Wed, 16 Nov 2016 15:15:35 +0500 Subject: [PATCH] AMDTPowerProfileApi: fix build issues The nearbyint implementation requires math.h to be appropriately found by the compiler. Also fix warnings from gcc6 regarding left-shift of negative number. Signed-off-by: Awais Belal --- .../Backend/AMDTPowerProfileAPI/src/AMDTPowerProfileApi.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CodeXL/Components/PowerProfiling/Backend/AMDTPowerProfileAPI/src/AMDTPowerProfileApi.cpp b/CodeXL/Components/PowerProfiling/Backend/AMDTPowerProfileAPI/src/AMDTPowerProfileApi.cpp index 4629d3e..3996392 100755 --- a/CodeXL/Components/PowerProfiling/Backend/AMDTPowerProfileAPI/src/AMDTPowerProfileApi.cpp +++ b/CodeXL/Components/PowerProfiling/Backend/AMDTPowerProfileAPI/src/AMDTPowerProfileApi.cpp @@ -33,6 +33,7 @@ #include #include #include +#include void __attribute__((constructor)) initPowerProfileDriverInterface(void); void __attribute__((destructor)) finiPowerProfileDriverInterface(void); @@ -751,7 +752,7 @@ AMDTUInt32 PwrGetCoreMask() if (PROFILE_TYPE_PROCESS_PROFILING == g_profileType) { - mask = ~0 ^ (~0 << g_sysInfo.m_coreCnt); + mask = ~((AMDTUInt32)0) ^ (~((AMDTUInt32)0) << g_sysInfo.m_coreCnt); } else { -- 1.9.1