Merge lp:~mitya57/libdbusmenu/massivedebugging-fix into lp:libdbusmenu

Proposed by Dmitry Shachnev
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: 484
Merged at revision: 484
Proposed branch: lp:~mitya57/libdbusmenu/massivedebugging-fix
Merge into: lp:libdbusmenu
Diff against target: 25 lines (+2/-2)
2 files modified
libdbusmenu-glib/client.c (+1/-1)
libdbusmenu-gtk/client.c (+1/-1)
To merge this branch: bzr merge lp:~mitya57/libdbusmenu/massivedebugging-fix
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
Ted Gould Pending
DBus Menu Team Pending
Review via email: mp+311830@code.launchpad.net

Commit message

Fix build with --enable-massivedebugging

Use %p for printing pointers, otherwise GCC complains.

Description of the change

This fixes the following compiler errors when configured with --enable-massivedebugging:

client.c: In function ‘dbusmenu_client_get_root’:
client.c:2514:33: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
  g_debug("Client get root: %X", (guint)priv->root);

client.c: In function ‘destroy_gmi’:
client.c:882:10: error: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘GtkMenuItem * {aka struct _GtkMenuItem *}’ [-Werror=format=]
  g_debug("Destroying GTK Menuitem %d", gmi);

To post a comment you must log in.
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Thanks

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libdbusmenu-glib/client.c'
2--- libdbusmenu-glib/client.c 2013-06-10 18:09:13 +0000
3+++ libdbusmenu-glib/client.c 2016-11-25 14:47:30 +0000
4@@ -2511,7 +2511,7 @@
5 DbusmenuClientPrivate * priv = DBUSMENU_CLIENT_GET_PRIVATE(client);
6
7 #ifdef MASSIVEDEBUGGING
8- g_debug("Client get root: %X", (guint)priv->root);
9+ g_debug("Client get root: %p", priv->root);
10 #endif
11
12 return priv->root;
13
14=== modified file 'libdbusmenu-gtk/client.c'
15--- libdbusmenu-gtk/client.c 2016-02-23 20:08:34 +0000
16+++ libdbusmenu-gtk/client.c 2016-11-25 14:47:30 +0000
17@@ -879,7 +879,7 @@
18 destroy_gmi (GtkMenuItem * gmi)
19 {
20 #ifdef MASSIVEDEBUGGING
21- g_debug("Destroying GTK Menuitem %d", gmi);
22+ g_debug("Destroying GTK Menuitem %p", gmi);
23 #endif
24
25 /* Call gtk_widget_destroy to remove from any containers and cleanup */

Subscribers

People subscribed via source and target branches