[icinga-checkins] icinga.org: icinga2/next: Fix compiler warning in PerfdataValue::Parse.

git at icinga.org git at icinga.org
Mon Nov 11 13:14:53 CET 2013


Module: icinga2
Branch: next
Commit: 95712e46d48a64247f10e3548829d21621ea67e4
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=95712e46d48a64247f10e3548829d21621ea67e4

Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date:   Mon Nov 11 13:14:42 2013 +0100

Fix compiler warning in PerfdataValue::Parse.

Fixes #5055

---

 lib/icinga/perfdatavalue.cpp |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/lib/icinga/perfdatavalue.cpp b/lib/icinga/perfdatavalue.cpp
index 9cc5fa0..c00d1b4 100644
--- a/lib/icinga/perfdatavalue.cpp
+++ b/lib/icinga/perfdatavalue.cpp
@@ -63,24 +63,24 @@ Value PerfdataValue::Parse(const String& perfdata)
 	boost::algorithm::to_lower(unit);
 
 	if (unit == "us") {
-		value /= 1000 * 1000;
+		value /= 1000.0 * 1000.0;
 		unit = "seconds";
 	} else if (unit == "ms") {
-		value /= 1000;
+		value /= 1000.0;
 		unit = "seconds";
 	} else if (unit == "s") {
 		unit = "seconds";
 	} else if (unit == "tb") {
-		value *= 1024 * 1024 * 1024 * 1024;
+		value *= 1024.0 * 1024.0 * 1024.0 * 1024.0;
 		unit = "bytes";
 	} else if (unit == "gb") {
-		value *= 1024 * 1024 * 1024;
+		value *= 1024.0 * 1024.0 * 1024.0;
 		unit = "bytes";
 	} else if (unit == "mb") {
-		value *= 1024 * 1024;
+		value *= 1024.0 * 1024.0;
 		unit = "bytes";
 	} else if (unit == "kb") {
-		value *= 1024;
+		value *= 1024.0;
 		unit = "bytes";
 	} else if (unit == "b") {
 		unit = "bytes";





More information about the icinga-checkins mailing list