gnome-system-monitor/format.patch
2011-05-12 17:43:20 -04:00

45 lines
1.9 KiB
Diff

diff -up gnome-system-monitor-3.1.1/src/load-graph.cpp.format gnome-system-monitor-3.1.1/src/load-graph.cpp
--- gnome-system-monitor-3.1.1/src/load-graph.cpp.format 2011-05-09 17:45:06.000000000 -0400
+++ gnome-system-monitor-3.1.1/src/load-graph.cpp 2011-05-12 17:43:01.136470995 -0400
@@ -399,7 +399,7 @@ net_scale (LoadGraph *g, guint64 din, gu
new_max = 1.1 * new_max;
// make sure max is not 0 to avoid / 0
// default to 125 bytes == 1kbit
- new_max = std::max(new_max, 125UL);
+ new_max = std::max(new_max, G_GUINT64_CONSTANT(125));
} else {
// round up to get some extra space
@@ -407,7 +407,7 @@ net_scale (LoadGraph *g, guint64 din, gu
new_max = 1.1 * new_max;
// make sure max is not 0 to avoid / 0
// default to 1 KiB
- new_max = std::max(new_max, 1024UL);
+ new_max = std::max(new_max, G_GUINT64_CONSTANT(1024));
// decompose new_max = coef10 * 2**(base10 * 10)
// where coef10 and base10 are integers and coef10 < 2**10
@@ -433,11 +433,11 @@ net_scale (LoadGraph *g, guint64 din, gu
g_assert(coef10 % g->num_bars() == 0);
new_max = coef10 * (1UL << guint64(base10 * 10));
- procman_debug("bak %lu new_max %lu pow2 %lu coef10 %lu", bak_max, new_max, pow2, coef10);
+ procman_debug("bak %" G_GUINT64_FORMAT " new_max %" G_GUINT64_FORMAT " pow2 %" G_GUINT64_FORMAT " coef10 %" G_GUINT64_FORMAT, bak_max, new_max, pow2, coef10);
}
if (bak_max > new_max) {
- procman_debug("overflow detected: bak=%lu new=%lu", bak_max, new_max);
+ procman_debug("overflow detected: bak=%" G_GUINT64_FORMAT " new=%" G_GUINT64_FORMAT, bak_max, new_max);
new_max = bak_max;
}
@@ -455,7 +455,7 @@ net_scale (LoadGraph *g, guint64 din, gu
}
}
- procman_debug("rescale dmax = %lu max = %lu new_max = %lu", dmax, g->net.max, new_max);
+ procman_debug("rescale dmax = %" G_GUINT64_FORMAT " max = %" G_GUINT64_FORMAT " new_max = %" G_GUINT64_FORMAT, dmax, g->net.max, new_max);
g->net.max = new_max;