summaryrefslogtreecommitdiff
path: root/libappstream-glib/as-profile.c
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2016-07-25 12:29:53 +0100
committerRichard Hughes <richard@hughsie.com>2016-07-25 12:29:53 +0100
commit74594acf6d9745b8ea0d4efbd58a4fc331f6ef46 (patch)
treefa31b9f18eea4396a1e247f20630334e42c9f046 /libappstream-glib/as-profile.c
parente04788886491aeb6ace2ba1d1161f0ce86c04a21 (diff)
downloadappstream-glib-74594acf6d9745b8ea0d4efbd58a4fc331f6ef46.tar.gz
Add two new GCC warnings and fix up signed/unsigned issues
Diffstat (limited to 'libappstream-glib/as-profile.c')
-rw-r--r--libappstream-glib/as-profile.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libappstream-glib/as-profile.c b/libappstream-glib/as-profile.c
index c6833db..7391c35 100644
--- a/libappstream-glib/as-profile.c
+++ b/libappstream-glib/as-profile.c
@@ -178,7 +178,7 @@ as_profile_task_free_internal (AsProfile *profile, const gchar *id)
}
/* debug */
- elapsed_ms = (item->time_stop - item->time_start) / 1000;
+ elapsed_ms = (gdouble) (item->time_stop - item->time_start) / 1000;
if (elapsed_ms > 5)
g_debug ("%s took %.0fms", id_thr, elapsed_ms);
@@ -285,10 +285,11 @@ as_profile_dump (AsProfile *profile)
continue;
/* print a timechart of what we've done */
- bar_offset = scale * (item->time_start - time_start) / 1000;
+ bar_offset = (guint) (scale * (gdouble) (item->time_start -
+ time_start) / 1000);
for (j = 0; j < bar_offset; j++)
g_print (" ");
- bar_length = scale * time_ms;
+ bar_length = (guint) (scale * (gdouble) time_ms);
if (bar_length == 0)
bar_length = 1;
for (j = 0; j < bar_length; j++)