Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Grunberg2012-03-01 10:35:40 -0500
committerRoland Grunberg2012-03-01 10:35:40 -0500
commit28f191fd9e34e42a5c29e7e5ea090c53db89bb47 (patch)
tree876f468e4a3d7acc4a2fdeb16dc60c7af45630a1 /valgrind
parentf05524e3d29be41f3be77605d5480b139aa8e52a (diff)
downloadorg.eclipse.linuxtools-28f191fd9e34e42a5c29e7e5ea090c53db89bb47.tar.gz
org.eclipse.linuxtools-28f191fd9e34e42a5c29e7e5ea090c53db89bb47.tar.xz
org.eclipse.linuxtools-28f191fd9e34e42a5c29e7e5ea090c53db89bb47.zip
Cast operand of data scaling operations to prevent truncation. (findbugs)
Diffstat (limited to 'valgrind')
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/internal/valgrind/massif/birt/HeapChart.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/internal/valgrind/massif/birt/HeapChart.java b/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/internal/valgrind/massif/birt/HeapChart.java
index 1e5639f67b..eb3e26c213 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/internal/valgrind/massif/birt/HeapChart.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/internal/valgrind/massif/birt/HeapChart.java
@@ -65,12 +65,12 @@ public class HeapChart {
}
dataTotal = new double[snapshots.length];
for (int i = 0; i < snapshots.length; i++) {
- time[i] = snapshots[i].getTime() / xScaling;
- dataUseful[i] = snapshots[i].getHeapBytes() / yScaling;
- dataExtra[i] = snapshots[i].getHeapExtra() / yScaling;
+ time[i] = snapshots[i].getTime() / (double) xScaling;
+ dataUseful[i] = snapshots[i].getHeapBytes() / (double) yScaling;
+ dataExtra[i] = snapshots[i].getHeapExtra() / (double) yScaling;
dataTotal[i] = dataUseful[i] + dataExtra[i];
if (isStack) {
- dataStacks[i] = snapshots[i].getStacks() / yScaling;
+ dataStacks[i] = snapshots[i].getStacks() / (double) yScaling;
}
}

Back to the top