aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2012-11-16 20:40:54 +0000
committerTarmac <Unknown>2012-11-16 20:40:54 +0000
commit9d92445e7a195a045b625bde4bd156a6ec99f65e (patch)
tree769b6afef0155888e1bb67a58b14cbd7d5ded606
parenta911ab8ede02014c072a4845055e1b15ac9b7c7c (diff)
parent1d3272d005ff3bf6de0614c2ef10c0e92fa75ed0 (diff)
downloadayatana-indicator-power-9d92445e7a195a045b625bde4bd156a6ec99f65e.tar.gz
ayatana-indicator-power-9d92445e7a195a045b625bde4bd156a6ec99f65e.tar.bz2
ayatana-indicator-power-9d92445e7a195a045b625bde4bd156a6ec99f65e.zip
explicitly cast integral values to the correct type when passing them to a varargs function. Fixes: https://bugs.launchpad.net/bugs/1079795.
Approved by Ted Gould, Mathieu Trudel-Lapierre, PS Jenkins bot.
-rw-r--r--tests/test-device.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test-device.cc b/tests/test-device.cc
index 021404f..d9d7956 100644
--- a/tests/test-device.cc
+++ b/tests/test-device.cc
@@ -199,11 +199,11 @@ TEST_F(DeviceTest, NewFromVariant)
GVariant * variant = g_variant_new ("(susdut)",
"/object/path",
- UP_DEVICE_KIND_BATTERY,
+ (guint32) UP_DEVICE_KIND_BATTERY,
"icon",
- 50.0,
- UP_DEVICE_STATE_CHARGING,
- 30);
+ (gdouble) 50.0,
+ (guint32) UP_DEVICE_STATE_CHARGING,
+ (guint64) 30);
IndicatorPowerDevice * device = indicator_power_device_new_from_variant (variant);
ASSERT_TRUE (variant != NULL);
ASSERT_TRUE (device != NULL);