pidgin/purple-plugin-pack

Hack away the irssi compiler warnings

2020-03-01, Gary Kramlich
d94560cc0fe3
Parents 31abfdec8dd2
Children 55b7aca4aba8
Hack away the irssi compiler warnings
--- a/irssi/layout.c Sun Mar 01 19:35:13 2020 -0600
+++ b/irssi/layout.c Sun Mar 01 19:43:33 2020 -0600
@@ -107,7 +107,7 @@
conv = purple_conversation_new(ctype, account, name);
/* dirty hack alert! */
- if(ctype == PURPLE_BLIST_CHAT_NODE) {
+ if(ctype == (PurpleConversationType)PURPLE_BLIST_CHAT_NODE) {
PurpleChat *chat = (PurpleChat *)node;
purple_conv_chat_left(PURPLE_CONV_CHAT(conv));
@@ -128,7 +128,7 @@
if(node)
ret = purple_blist_node_get_int(node, IRSSI_LAYOUT_SETTING);
-
+
return ret;
}
@@ -148,7 +148,7 @@
/* reset the previous layouts if any exist */
irssi_layout_reset();
-
+
/* now save the layout... */
wins = pidgin_conv_windows_get_list();
@@ -211,6 +211,9 @@
GList *s = NULL;
gint win, pos, setting;
+ /* this is a junk var needed for the horrible macro below */
+ (void)pos;
+
setting = GPOINTER_TO_INT(l2->data);
SETTING_TO_INTS(setting, pos, win);
@@ -258,6 +261,7 @@
for(wins = pidgin_conv_windows_get_list(); wins; wins = wins->next) {
gint count, i, pos, position;
gint w; /* junk var */
+ (void)w;
window = wins->data;
count = pidgin_conv_window_get_gtkconv_count(window);
@@ -270,6 +274,7 @@
pos = irssi_layout_get_setting(gtkconv);
SETTING_TO_INTS(pos, pos, w);
+
if(pos <= 0)
continue;
@@ -277,7 +282,7 @@
for(i = pos; i < position; i++) {
PidginConversation *gtkconv2 = NULL;
gint p;
-
+
gtkconv2 =
pidgin_conv_window_get_gtkconv_at_index(window, i);
@@ -338,7 +343,7 @@
irssi_layout_uninit(PurplePlugin *plugin) {
if(irssi_layout_cmd_id == 0)
return;
-
+
purple_cmd_unregister(irssi_layout_cmd_id);
}