Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#12507 closed patch (fixed)

[PATCH] Build warnings / portability issues x86_64

Reported by: dimstar Owned by: rekkanoryo
Milestone: 2.7.10 Component: unclassified
Version: 2.7.7 Keywords:
Cc:

Description (last modified by darkrain42)

Building pidgin, up to 2.7.3, results in those warnings:

file included from dbus-server.c:426:0:
dbus-bindings.c: In function 'purple_conversation_set_data_DBUS':
dbus-bindings.c:4209:2: warning: passing argument 3 of 'purple_conversation_set_data' makes pointer from integer without a cast
conversation.h:576:6: note: expected 'gpointer' but argument is of type 'dbus_int32_t'
dbus-bindings.c: In function 'purple_conversation_get_data_DBUS':
dbus-bindings.c:4226:9: warning: assignment makes integer from pointer without a cast
dbus-bindings.c: In function 'purple_core_quit_cb_DBUS':
dbus-bindings.c:5488:2: warning: passing argument 1 of 'purple_core_quit_cb' makes pointer from integer without a cast
core.h:120:10: note: expected 'gpointer' but argument is of type 'dbus_int32_t'
dbus-bindings.c: In function 'purple_prefs_set_generic_DBUS':
dbus-bindings.c:7380:2: warning: passing argument 2 of 'purple_prefs_set_generic' makes pointer from integer without a cast
prefs.h:198:6: note: expected 'gpointer' but argument is of type 'dbus_int32_t'
dbus-bindings.c: In function 'purple_util_format_song_info_DBUS':
dbus-bindings.c:10554:2: warning: passing argument 4 of 'purple_util_format_song_info' makes pointer from integer without a cast
media/../util.h:120:8: note: expected 'gpointer' but argument is of type 'dbus_int32_t'

which in the openSUSE build root policy checks are raised to errors: E: pidgin 64bit-portability-issue dbus-bindings.c:4209, 5488, 7380, 10554

The attached patch removes gpointer from the list of simple types, which resolves the issue (the patch has been in openSUSE packages for a long time already, since March 2008.

Please merge the patch in upstream code, so we can drop it in our packages.

Attachments (1)

pidgin-dbus-invalid-gpointer.patch (791 bytes) - added by dimstar 9 years ago.
ERROR: pidgin 64bit-portability-issue dbus-bindings.c: 9605

Download all attachments as: .zip

Change History (16)

Changed 9 years ago by dimstar

ERROR: pidgin 64bit-portability-issue dbus-bindings.c: 9605

comment:1 Changed 8 years ago by dimstar

  • Version changed from 2.7.3 to 2.7.7

comment:2 Changed 8 years ago by dimstar

  • Summary changed from Build warnings / portability issues x86_64 to [PATCH] Build warnings / portability issues x86_64

comment:3 Changed 8 years ago by dimstar

  • Type changed from defect to patch

comment:4 Changed 8 years ago by rekkanoryo

  • Milestone set to Patches Needing Review

comment:5 Changed 8 years ago by darkrain42

  • Description modified (diff)

comment:6 Changed 8 years ago by darkrain42

Most of these functions (with the exception of the last and possibly the first) probably shouldn't even be exposed via DBUS.

Need to investigate what exactly this patch does to those function dbus wrappers.

comment:7 Changed 8 years ago by darkrain42

  • Milestone changed from Patches Needing Review to 2.7.8

Okay, this patch has the effect of removing those functions from the DBUS API. This seems reasonable to me, and hopefully we can see if people complain.

comment:8 Changed 8 years ago by darkrain42

...as an aside, if we're translating gssize and size_t into dbus_int32_t in any places, that's going to be equally broken. Given the lack of compiler warnings, I guess I'll just stick my head in the sand and assume it's ok.

comment:9 Changed 8 years ago by rekkanoryo

darkrain42: Is this patch acceptable to you? If so, I'd like it to go in 2.7.10.

comment:10 Changed 8 years ago by darkrain42

Yes, this patch was fine.

comment:11 Changed 8 years ago by rekkanoryo

dimstar, we need a name and e-mail address to credit you with. Are the name and address you supplied to trac adequate, or is there alternate information you'd prefer to be credited with?

comment:12 Changed 8 years ago by dimstar

rekkanoryo: Thank you for looking into the patch. For attribution, please just use ' The openSUSE project (opensuse-project@…)'.

This patch has been for so long in our package, that I can't find who exactly wrote it at the time :) But it was certainly not me (I took over maintainership and just want to get rid of patches that make sense upstream).

comment:13 Changed 8 years ago by opensuse-project@…

  • Resolution set to fixed
  • Status changed from new to closed

(In 83923425ae649610dc9a45a64e7aa2fe46aaaa40):
Stop translating gpointer to int in the dbus API. This has the effect of removing a number of functions from the API, which probably shouldn't have been there in the first place. Fixes #12507.

comment:14 Changed 8 years ago by badboy_

As this patch removes several functions, a little script of mine is broken.

I used 'purple.PurpleConversationGetData?(conv, "unseen-count")' to get a total number of unread messages. Now that PurpleConversationGetData? isn't exported through DBUS anymore, can you tell me how I can get the count?

comment:15 Changed 8 years ago by R2D2!

I also use the script created by badboy_ , and it's a problem not to have the unread message count.

I've also seen that recently somebody created a Unity launcher that does show unread message count. http://www.omgubuntu.co.uk/2011/04/how-to-display-unread-pidgin-count-on-unity-launcher/

How does this one can read the count? And how can it be used in the Python script?

Note: See TracTickets for help on using tickets.
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!