[rhythmbox] Fix build on x86_32
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox] Fix build on x86_32
- Date: Sat, 6 Feb 2016 19:46:07 +0000 (UTC)
commit 634189557dc379d62ba186e9368eaaec6fa62145
Author: Sam Thursfield <sam afuera me uk>
Date: Sat Feb 6 19:33:02 2016 +0000
Fix build on x86_32
I got this build failure building 'master' using jhbuild:
In file included from rb-android-source.c:42:0:
rb-android-source.c: In function ‘free_space_cb’:
rb-android-source.c:127:13: error: format ‘%lu’ expects argument of type
‘long unsigned int’, but argument 6 has type ‘guint64 {aka long long
unsigned int}’ [-Werror=format=]
rb_debug ("capacity: %lu, free space: %lu", priv->storage_capacity_next,
priv->storage_free_space_next);
^
../../lib/rb-debug.h:41:79: note: in definition of macro ‘rb_debug’
#define rb_debug(...) rb_debug_realf (__FUNCTION__, __FILE__, __LINE__, TRUE, __VA_ARGS__)
^
rb-android-source.c:127:13: error: format ‘%lu’ expects argument of type
‘long unsigned int’, but argument 7 has type ‘guint64 {aka long long
unsigned int}’ [-Werror=format=]
rb_debug ("capacity: %lu, free space: %lu", priv->storage_capacity_next,
priv->storage_free_space_next);
^
../../lib/rb-debug.h:41:79: note: in definition of macro ‘rb_debug’
#define rb_debug(...) rb_debug_realf (__FUNCTION__, __FILE__, __LINE__, TRUE, __VA_ARGS__)
^
cc1: all warnings being treated as errors
Fixed by using %G_GUINT64_FORMAT instead of %lu to display the guint64
parameters. The correct % format to use for guint64 depends on the
target libc and architecture, sadly.
plugins/android/rb-android-source.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/plugins/android/rb-android-source.c b/plugins/android/rb-android-source.c
index b9eddb5..853220c 100644
--- a/plugins/android/rb-android-source.c
+++ b/plugins/android/rb-android-source.c
@@ -124,7 +124,8 @@ free_space_cb (GObject *obj, GAsyncResult *res, gpointer data)
} else {
priv->storage_free_space_next += g_file_info_get_attribute_uint64 (info,
G_FILE_ATTRIBUTE_FILESYSTEM_FREE);
priv->storage_capacity_next += g_file_info_get_attribute_uint64 (info,
G_FILE_ATTRIBUTE_FILESYSTEM_SIZE);
- rb_debug ("capacity: %lu, free space: %lu", priv->storage_capacity_next,
priv->storage_free_space_next);
+ rb_debug ("capacity: %" G_GUINT64_FORMAT ", free space: %" G_GUINT64_FORMAT,
+ priv->storage_capacity_next, priv->storage_free_space_next);
}
priv->query_storage = priv->query_storage->next;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]