aboutsummaryrefslogtreecommitdiff
path: root/src/device-provider-upower.c
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2014-07-13 23:33:16 -0500
committerCharles Kerr <charles.kerr@canonical.com>2014-07-13 23:33:16 -0500
commit3f29c1a35113bfd2461dca76235f1812c8dfd6ef (patch)
treef431b2f52e64ddb4999be2f6791c160f24da6470 /src/device-provider-upower.c
parent2d06cbb066f9ae0a0a49d5d260ebe28bb17311fc (diff)
downloadayatana-indicator-power-3f29c1a35113bfd2461dca76235f1812c8dfd6ef.tar.gz
ayatana-indicator-power-3f29c1a35113bfd2461dca76235f1812c8dfd6ef.tar.bz2
ayatana-indicator-power-3f29c1a35113bfd2461dca76235f1812c8dfd6ef.zip
fix some compiler warnings generated by clang static analyzer
Diffstat (limited to 'src/device-provider-upower.c')
-rw-r--r--src/device-provider-upower.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/device-provider-upower.c b/src/device-provider-upower.c
index 7c12beb..400a060 100644
--- a/src/device-provider-upower.c
+++ b/src/device-provider-upower.c
@@ -17,8 +17,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "config.h"
-
#include "dbus-upower.h"
#include "device.h"
#include "device-provider.h"
@@ -60,7 +58,7 @@ G_DEFINE_TYPE_WITH_CODE (
indicator_power_device_provider_upower,
G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (INDICATOR_TYPE_POWER_DEVICE_PROVIDER,
- indicator_power_device_provider_interface_init));
+ indicator_power_device_provider_interface_init))
/***
**** UPOWER DBUS
@@ -102,7 +100,7 @@ on_device_properties_ready (GObject * o, GAsyncResult * res, gpointer gdata)
gdouble percentage = 0;
gint64 time_to_empty = 0;
gint64 time_to_full = 0;
- time_t time;
+ gint64 time;
IndicatorPowerDevice * device;
IndicatorPowerDeviceProviderUPowerPriv * p = data->self->priv;
GVariant * dict = g_variant_get_child_value (response, 0);
@@ -120,7 +118,7 @@ on_device_properties_ready (GObject * o, GAsyncResult * res, gpointer gdata)
INDICATOR_POWER_DEVICE_STATE, (gint)state,
INDICATOR_POWER_DEVICE_OBJECT_PATH, data->path,
INDICATOR_POWER_DEVICE_PERCENTAGE, percentage,
- INDICATOR_POWER_DEVICE_TIME, (guint64)time,
+ INDICATOR_POWER_DEVICE_TIME, time,
NULL);
}
else
@@ -129,7 +127,7 @@ on_device_properties_ready (GObject * o, GAsyncResult * res, gpointer gdata)
kind,
percentage,
state,
- time);
+ (time_t)time);
g_hash_table_insert (p->devices,
g_strdup (data->path),