blob: 1a50ec2f763c3ca10190fe90ab8551b87b736a79 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
From 683c17574ab3c2df7891428ce23eac78332526a3 Mon Sep 17 00:00:00 2001
From: Awais Belal <awais_belal@mentor.com>
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 <awais_belal@mentor.com>
---
.../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 <sys/time.h>
#include <unistd.h>
#include <stdlib.h>
+#include <math.h>
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
|