summaryrefslogtreecommitdiff
path: root/libappstream-glib/as-node.c
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2016-08-22 09:55:17 +0100
committerRichard Hughes <richard@hughsie.com>2016-08-22 10:04:44 +0100
commit18c524132d315e2fbf8d8be5bbe3e4b1faeb0ff9 (patch)
treec4c04c9139859bab147deae8f99c251796b192c8 /libappstream-glib/as-node.c
parente660570b428b5a645e391070608b25b5a5b38ebf (diff)
downloadappstream-glib-18c524132d315e2fbf8d8be5bbe3e4b1faeb0ff9.tar.gz
trivial: Fix several -Wsign-conversion issues on ARM
Diffstat (limited to 'libappstream-glib/as-node.c')
-rw-r--r--libappstream-glib/as-node.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libappstream-glib/as-node.c b/libappstream-glib/as-node.c
index c54f92d..bceb7b2 100644
--- a/libappstream-glib/as-node.c
+++ b/libappstream-glib/as-node.c
@@ -1324,17 +1324,17 @@ as_node_insert_line_breaks (const gchar *text, guint break_len)
{
GString *str;
guint i;
- guint new_len;
+ gssize new_len;
/* allocate long enough for the string, plus the extra newlines */
- new_len = (guint) strlen (text) * (break_len + 1) / break_len;
+ new_len = (gssize) (strlen (text) * (break_len + 1) / break_len);
str = g_string_new_len (NULL, new_len + 2);
g_string_append (str, "\n");
g_string_append (str, text);
/* insert a newline every break length */
for (i = break_len + 1; i < str->len; i += break_len + 1)
- g_string_insert (str, i, "\n");
+ g_string_insert (str, (gssize) i, "\n");
g_string_append (str, "\n");
return g_string_free (str, FALSE);
}