diff options
author | Richard Hughes <richard@hughsie.com> | 2016-07-25 12:29:53 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2016-07-25 12:29:53 +0100 |
commit | 74594acf6d9745b8ea0d4efbd58a4fc331f6ef46 (patch) | |
tree | fa31b9f18eea4396a1e247f20630334e42c9f046 /libappstream-glib/as-inf.c | |
parent | e04788886491aeb6ace2ba1d1161f0ce86c04a21 (diff) | |
download | appstream-glib-74594acf6d9745b8ea0d4efbd58a4fc331f6ef46.tar.gz |
Add two new GCC warnings and fix up signed/unsigned issues
Diffstat (limited to 'libappstream-glib/as-inf.c')
-rw-r--r-- | libappstream-glib/as-inf.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libappstream-glib/as-inf.c b/libappstream-glib/as-inf.c index d1523e9..067748d 100644 --- a/libappstream-glib/as-inf.c +++ b/libappstream-glib/as-inf.c @@ -515,7 +515,7 @@ as_inf_parse_line (AsInfHelper *helper, gchar *line, GError **error) } /* last char continuation */ - len = strlen (line); + len = (guint) strlen (line); if (line[len-1] == '\\') { line[len-1] = '\0'; continuation = TRUE; @@ -695,7 +695,7 @@ as_inf_parse_line (AsInfHelper *helper, gchar *line, GError **error) } /* add fake key */ - key = g_strdup_printf ("value%03i", helper->nokey_idx++); + key = g_strdup_printf ("value%03u", helper->nokey_idx++); as_inf_set_key (helper, key, line); out: helper->last_line_continuation = continuation; @@ -760,7 +760,7 @@ as_inf_load_data (GKeyFile *keyfile, for (i = 0; lines[i] != NULL; i++) { if (!as_inf_parse_line (helper, lines[i], error)) { g_prefix_error (error, - "Failed to parse line %i: ", + "Failed to parse line %u: ", i + 1); ret = FALSE; goto out; @@ -781,7 +781,7 @@ as_inf_load_data (GKeyFile *keyfile, for (i = 0; lines2[i] != NULL; i++) { if (!as_inf_parse_line (helper, lines2[i], error)) { g_prefix_error (error, - "Failed to parse line %i: ", + "Failed to parse line %u: ", i + 1); ret = FALSE; goto out; @@ -928,7 +928,7 @@ as_inf_get_driver_version (GKeyFile *keyfile, guint64 *timestamp, GError **error dv_split[0]); return NULL; } - *timestamp = g_date_time_to_unix (dt); + *timestamp = (guint64) g_date_time_to_unix (dt); } return g_strdup (dv_split[1]); } |