summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIain Lane <iain@orangesquash.org.uk>2017-06-16 13:11:43 +0100
committerRichard Hughes <richard@hughsie.com>2017-06-16 13:17:26 +0100
commitf0f5cb000c955e8970a03ff00249075510b8778b (patch)
tree6abec2a32897c4171020c84772f810309deb6bc4
parentc74fa38af1cac2d259c62df4d4a0b852375bcbd3 (diff)
downloadappstream-glib-f0f5cb000c955e8970a03ff00249075510b8778b.tar.gz
as-app-builder: Don't cast gsize to guint32 when getting file length
One some CPU architectures this doesn't work.
-rw-r--r--libappstream-glib/as-app-builder.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libappstream-glib/as-app-builder.c b/libappstream-glib/as-app-builder.c
index 407ce13..db8ac9f 100644
--- a/libappstream-glib/as-app-builder.c
+++ b/libappstream-glib/as-app-builder.c
@@ -294,7 +294,7 @@ as_app_builder_parse_file_qt (AsAppBuilderContext *ctx,
const gchar *filename,
GError **error)
{
- guint32 len;
+ gsize len;
guint32 m = 0;
g_autofree guint8 *data = NULL;
const guint8 qm_magic[] = {
@@ -303,7 +303,7 @@ as_app_builder_parse_file_qt (AsAppBuilderContext *ctx,
};
/* load file */
- if (!g_file_get_contents (filename, (gchar **) &data, (gsize *) &len, error))
+ if (!g_file_get_contents (filename, (gchar **) &data, &len, error))
return FALSE;
/* check header */