[rhythmbox] use proper g_print modifier for GUdevDeviceNumber (bug #603263)
- From: Christophe Fergeau <teuf src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [rhythmbox] use proper g_print modifier for GUdevDeviceNumber (bug #603263)
- Date: Sun, 29 Nov 2009 10:49:20 +0000 (UTC)
commit ad30cb76a1d430a16c897dd9feacaad3cc5eb5d9
Author: Christophe Fergeau <cfergeau mandriva com>
Date: Sun Nov 29 11:46:46 2009 +0100
use proper g_print modifier for GUdevDeviceNumber (bug #603263)
On 64 bit systems, compilation was failing because we were using %x to try
to print what is a 64 bit value. Use G_GINT64_MODIFIER and cast the value
to guint64 before printing it to be 100% everything is good.
plugins/mtpdevice/rb-mtp-plugin.c | 4 ++--
shell/rb-removable-media-manager.c | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/plugins/mtpdevice/rb-mtp-plugin.c b/plugins/mtpdevice/rb-mtp-plugin.c
index 1a7cf3d..897e8f1 100644
--- a/plugins/mtpdevice/rb-mtp-plugin.c
+++ b/plugins/mtpdevice/rb-mtp-plugin.c
@@ -368,8 +368,8 @@ create_source_device_cb (RBRemovableMediaManager *rmm, GObject *device, RBMtpPlu
}
devnum = strtol (devnum_str, NULL, 10);
- rb_debug ("trying to match device %x (usb device %d) against detected mtp devices",
- device_number, devnum);
+ rb_debug ("trying to match device %"G_GINT64_MODIFIER"x (usb device %d) against detected mtp devices",
+ (guint64)device_number, devnum);
/* see what devices libmtp can find */
if (LIBMTP_Detect_Raw_Devices (&raw_devices, &num_raw_devices) == 0) {
diff --git a/shell/rb-removable-media-manager.c b/shell/rb-removable-media-manager.c
index 2773761..a9d9035 100644
--- a/shell/rb-removable-media-manager.c
+++ b/shell/rb-removable-media-manager.c
@@ -568,7 +568,8 @@ uevent_cb (GUdevClient *client, const char *action, GUdevDevice *device, RBRemov
RBRemovableMediaManagerPrivate *priv = GET_PRIVATE (mgr);
GUdevDeviceNumber devnum;
devnum = g_udev_device_get_device_number (device);
- rb_debug ("%s event for %s (%x)", action, g_udev_device_get_sysfs_path (device), devnum);
+ rb_debug ("%s event for %s (%"G_GINT64_MODIFIER"x)", action,
+ g_udev_device_get_sysfs_path (device), (guint64)devnum);
if (g_str_equal (action, "add")) {
RBSource *source = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]