Mon, 06 Mar 2017 16:06:52 -0300
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 @@ */ #define SIZE 256 -#define IS_END 1 << 0 +#define IS_END (1 << 0) struct _node { 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 @@ g_free, NULL); pointer_icon_cache = g_hash_table_new(g_direct_hash, g_direct_equal); - if (!cache_dir) - cache_dir = g_build_filename(purple_user_dir(), "icons", NULL); + if (!cache_dir) + 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 @@ */ +#ifndef DBUS_EXPORT #define DBUS_EXPORT +#endif /* 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 @@ if(check_if_blocked(pb)) return; - 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 @@ static int rtf_pop_state(NMRtfContext *ctx) { - NMRtfStateSave *save_old; + NMRtfStateSave *save_old; GSList *link_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->depth)--; + ctx->chp = save_old->chp; + ctx->rds = save_old->rds; + ctx->ris = save_old->ris; + (ctx->depth)--; - g_free(save_old); + g_free(save_old); link_old = ctx->saved; ctx->saved = g_slist_remove_link(ctx->saved, link_old); g_slist_free_1(link_old); - return NMRTF_OK; + return NMRTF_OK; } /* @@ -671,13 +671,13 @@ static int 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*/ rtf_flush_data(ctx); - switch (prop) { + switch (prop) { case NMRTF_PROP_FONT_IDX: ctx->chp.font_idx = val; break; @@ -686,9 +686,9 @@ break; default: return NMRTF_BAD_TABLE; - } + } - return NMRTF_OK; + return NMRTF_OK; } /*
--- 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 @@ if (!packet_len) return (ZERR_EOF); - 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, void *data) { - 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); } PurpleSslConnection * @@ -219,8 +219,9 @@ gsc->connect_cb = func; gsc->error_cb = error_func; gsc->fd = fd; - if(host) - gsc->host = g_strdup(host); + if (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 @@ /************************************************************************** * Base64 Functions **************************************************************************/ -static const char alphabet[] = - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" - "0123456789+/"; - static const char xdigits[] = "0123456789abcdef";