/pidgin/main: dcbaf8e5e624: Better warning fixes
Tomasz Wasilczyk
twasilczyk at pidgin.im
Tue May 6 12:29:05 EDT 2014
Changeset: dcbaf8e5e624b53eaa801261cd520fe7059ef1e6
Author: Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date: 2014-05-06 18:28 +0200
Branch: release-2.x.y
URL: https://hg.pidgin.im/pidgin/main/rev/dcbaf8e5e624
Description:
Better warning fixes
diffstat:
finch/gntnotify.c | 4 ----
libpurple/protocols/oscar/userinfo.c | 12 ++++++------
2 files changed, 6 insertions(+), 10 deletions(-)
diffs (43 lines):
diff --git a/finch/gntnotify.c b/finch/gntnotify.c
--- a/finch/gntnotify.c
+++ b/finch/gntnotify.c
@@ -84,10 +84,6 @@ finch_notify_common(PurpleNotifyType nty
if (secondary) {
GntWidget *msg;
- /* XXX: This is broken. type is PurpleNotifyMsgType, not
- * PurpleNotifyType. Also, the if() followed by the
- * inner switch doesn't make much sense.
- */
if (ntype == PURPLE_NOTIFY_FORMATTED) {
int width = -1, height = -1;
char *plain = (char*)secondary;
diff --git a/libpurple/protocols/oscar/userinfo.c b/libpurple/protocols/oscar/userinfo.c
--- a/libpurple/protocols/oscar/userinfo.c
+++ b/libpurple/protocols/oscar/userinfo.c
@@ -337,9 +337,9 @@ oscar_user_info_append_extra_info(Purple
if ((bi != NULL) && (bi->ipaddr != 0)) {
tmp = g_strdup_printf("%u.%u.%u.%u",
- 0xFF & (bi->ipaddr & 0xff000000) >> 24,
- 0xFF & (bi->ipaddr & 0x00ff0000) >> 16,
- 0xFF & (bi->ipaddr & 0x0000ff00) >> 8,
+ 0xFF & ((bi->ipaddr & 0xff000000) >> 24),
+ 0xFF & ((bi->ipaddr & 0x00ff0000) >> 16),
+ 0xFF & ((bi->ipaddr & 0x0000ff00) >> 8),
0xFF & (bi->ipaddr & 0x000000ff));
oscar_user_info_add_pair(user_info, _("IP Address"), tmp);
g_free(tmp);
@@ -401,9 +401,9 @@ oscar_user_info_display_icq(OscarData *o
oscar_user_info_convert_and_add(account, od, user_info, _("Nick"), info->nick);
if ((bi != NULL) && (bi->ipaddr != 0)) {
char *tstr = g_strdup_printf("%u.%u.%u.%u",
- 0xFF & (bi->ipaddr & 0xff000000) >> 24,
- 0xFF & (bi->ipaddr & 0x00ff0000) >> 16,
- 0xFF & (bi->ipaddr & 0x0000ff00) >> 8,
+ 0xFF & ((bi->ipaddr & 0xff000000) >> 24),
+ 0xFF & ((bi->ipaddr & 0x00ff0000) >> 16),
+ 0xFF & ((bi->ipaddr & 0x0000ff00) >> 8),
0xFF & (bi->ipaddr & 0x000000ff));
purple_notify_user_info_add_pair(user_info, _("IP Address"), tstr);
g_free(tstr);
More information about the Commits
mailing list