Fix some build warnings
- Redefinition of DBUS_EXPORT
- A whole lot of "misleading indentation" (which only appear in newer gcc)
- One unused static variable in util.c (alphabet, previously used for base64)
- "left shift by negative value" with the IS_END macro of libgnt. That macro is
"1 << 0" and expanded to "~1 << 0" in one place. So now it's "(1 << 0)"
--- a/finch/libgnt/gntkeys.c Thu Feb 23 06:35:24 2017 +0000
+++ b/finch/libgnt/gntkeys.c Mon Mar 06 16:06:52 2017 -0300
@@ -211,7 +211,7 @@
struct _node *next[SIZE];
--- a/libpurple/buddyicon.c Thu Feb 23 06:35:24 2017 +0000
+++ b/libpurple/buddyicon.c Mon Mar 06 16:06:52 2017 -0300
@@ -1264,8 +1264,8 @@
pointer_icon_cache = g_hash_table_new(g_direct_hash, g_direct_equal);
- cache_dir = g_build_filename(purple_user_dir(), "icons", NULL);
+ cache_dir = g_build_filename(purple_user_dir(), "icons", NULL); purple_signal_connect(purple_imgstore_get_handle(), "image-deleting",
purple_buddy_icons_get_handle(),
--- a/libpurple/dbus-server.h Thu Feb 23 06:35:24 2017 +0000
+++ b/libpurple/dbus-server.h Mon Mar 06 16:06:52 2017 -0300
@@ -199,7 +199,9 @@
Here we include the list of #PURPLE_DBUS_DECLARE_TYPE statements for
--- a/libpurple/protocols/bonjour/jabber.c Thu Feb 23 06:35:24 2017 +0000
+++ b/libpurple/protocols/bonjour/jabber.c Mon Mar 06 16:06:52 2017 -0300
@@ -1320,8 +1320,8 @@
- account = purple_buddy_get_account(pb);
- gc = purple_account_get_connection(account);
+ account = purple_buddy_get_account(pb); + gc = purple_account_get_connection(account); if (xmlnode_get_child(packet, "si") != NULL || xmlnode_get_child(packet, "error") != NULL)
xep_si_parse(gc, packet, pb);
--- a/libpurple/protocols/novell/nmrtf.c Thu Feb 23 06:35:24 2017 +0000
+++ b/libpurple/protocols/novell/nmrtf.c Mon Mar 06 16:06:52 2017 -0300
@@ -474,23 +474,23 @@
rtf_pop_state(NMRtfContext *ctx)
- NMRtfStateSave *save_old;
+ NMRtfStateSave *save_old; - if (ctx->saved == NULL)
- return NMRTF_STACK_UNDERFLOW;
+ if (ctx->saved == NULL) + return NMRTF_STACK_UNDERFLOW; save_old = ctx->saved->data;
- ctx->chp = save_old->chp;
- ctx->rds = save_old->rds;
- ctx->ris = save_old->ris;
+ ctx->chp = save_old->chp; + ctx->rds = save_old->rds; + ctx->ris = save_old->ris;
ctx->saved = g_slist_remove_link(ctx->saved, link_old);
g_slist_free_1(link_old);
@@ -671,13 +671,13 @@
rtf_apply_property(NMRtfContext *ctx, NMRtfProperty prop, int val)
- if (ctx->rds == NMRTF_STATE_SKIP) /* If we're skipping text, */
- return NMRTF_OK; /* don't do anything. */
+ if (ctx->rds == NMRTF_STATE_SKIP) /* If we're skipping text, */ + return NMRTF_OK; /* don't do anything. */ /* Need to flush any temporary data before a property change*/
case NMRTF_PROP_FONT_IDX:
@@ -686,9 +686,9 @@
--- a/libpurple/protocols/zephyr/Zinternal.c Thu Feb 23 06:35:24 2017 +0000
+++ b/libpurple/protocols/zephyr/Zinternal.c Mon Mar 06 16:06:52 2017 -0300
@@ -259,7 +259,7 @@
- packet[packet_len] = '\0';
+ packet[packet_len] = '\0'; /* Ignore obviously non-Zephyr packets. */
zvlen = sizeof(ZVERSIONHDR) - 1;
--- a/libpurple/sslconn.c Thu Feb 23 06:35:24 2017 +0000
+++ b/libpurple/sslconn.c Mon Mar 06 16:06:52 2017 -0300
@@ -190,7 +190,7 @@
PurpleSslErrorFunction error_func,
- return purple_ssl_connect_with_host_fd(account, fd, func, error_func, NULL, data);
+ return purple_ssl_connect_with_host_fd(account, fd, func, error_func, NULL, data); @@ -219,8 +219,9 @@
gsc->error_cb = error_func;
- gsc->host = g_strdup(host);
+ gsc->host = g_strdup(host); /* TODO: Move this elsewhere */
gsc->verifier = purple_certificate_find_verifier("x509","tls_cached");
--- a/libpurple/util.c Thu Feb 23 06:35:24 2017 +0000
+++ b/libpurple/util.c Mon Mar 06 16:06:52 2017 -0300
@@ -219,10 +219,6 @@
/**************************************************************************
**************************************************************************/
-static const char alphabet[] =
- "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
static const char xdigits[] =