aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconfigure8
-rw-r--r--ipc.c4
-rw-r--r--irc_commands.c4
-rw-r--r--lib/ns_parse.c2
-rw-r--r--lib/proxy.c8
-rw-r--r--protocols/oscar/conn.c2
-rw-r--r--protocols/yahoo/libyahoo2.c15
-rw-r--r--protocols/yahoo/yahoo_util.h3
-rw-r--r--tests/check_arc.c2
-rw-r--r--tests/check_irc.c1
-rw-r--r--tests/check_jabber_sasl.c1
11 files changed, 33 insertions, 17 deletions
diff --git a/configure b/configure
index d2913f13..8019c5f0 100755
--- a/configure
+++ b/configure
@@ -56,6 +56,14 @@ GLIB_MIN_VERSION=2.14
echo BitlBee configure
+# Cygwin and Darwin don't support PIC/PIE
+case "$arch" in
+ CYGWIN* )
+ pie=0;;
+ Darwin )
+ pie=0;;
+esac
+
while [ -n "$1" ]; do
e="`expr "X$1" : 'X--\(.*=.*\)'`"
if [ -z "$e" ]; then
diff --git a/ipc.c b/ipc.c
index 65b89498..a9b4304b 100644
--- a/ipc.c
+++ b/ipc.c
@@ -523,7 +523,9 @@ static void ipc_command_exec( void *data, char **cmd, const command_t *commands
if( g_strcasecmp( commands[i].command, cmd[0] ) == 0 )
{
/* There is no typo in this line: */
- for( j = 1; cmd[j]; j ++ ); j --;
+ for( j = 1; cmd[j]; j ++ )
+ ;
+ j--;
if( j < commands[i].required_parameters )
break;
diff --git a/irc_commands.c b/irc_commands.c
index 743fb417..6be756ff 100644
--- a/irc_commands.c
+++ b/irc_commands.c
@@ -769,7 +769,9 @@ void irc_exec( irc_t *irc, char *cmd[] )
if( g_strcasecmp( irc_commands[i].command, cmd[0] ) == 0 )
{
/* There should be no typo in the next line: */
- for( n_arg = 0; cmd[n_arg]; n_arg ++ ); n_arg --;
+ for( n_arg = 0; cmd[n_arg]; n_arg ++ )
+ ;
+ n_arg--;
if( irc_commands[i].flags & IRC_CMD_PRE_LOGIN && irc->status & USTATUS_LOGGED_IN )
{
diff --git a/lib/ns_parse.c b/lib/ns_parse.c
index ba45d513..0462b67e 100644
--- a/lib/ns_parse.c
+++ b/lib/ns_parse.c
@@ -18,7 +18,7 @@
#include "bitlbee.h"
#ifndef lint
-static const char rcsid[] = "$Id: ns_parse.c,v 1.10 2009/01/23 19:59:16 each Exp $";
+//static const char rcsid[] = "$Id: ns_parse.c,v 1.10 2009/01/23 19:59:16 each Exp $";
#endif
#ifdef HAVE_RESOLV_A
diff --git a/lib/proxy.c b/lib/proxy.c
index 86bb0dcc..2adcde3b 100644
--- a/lib/proxy.c
+++ b/lib/proxy.c
@@ -65,7 +65,7 @@ static int proxy_connect_none(const char *host, unsigned short port_, struct PHB
static gboolean gaim_io_connected(gpointer data, gint source, b_input_condition cond)
{
struct PHB *phb = data;
- unsigned int len;
+ socklen_t len;
int error = ETIMEDOUT;
len = sizeof(error);
@@ -213,7 +213,7 @@ static gboolean http_canwrite(gpointer data, gint source, b_input_condition cond
{
char cmd[384];
struct PHB *phb = data;
- unsigned int len;
+ socklen_t len;
int error = ETIMEDOUT;
if (phb->inpa > 0)
b_event_remove(phb->inpa);
@@ -308,7 +308,7 @@ static gboolean s4_canwrite(gpointer data, gint source, b_input_condition cond)
unsigned char packet[12];
struct hostent *hp;
struct PHB *phb = data;
- unsigned int len;
+ socklen_t len;
int error = ETIMEDOUT;
if (phb->inpa > 0)
b_event_remove(phb->inpa);
@@ -500,7 +500,7 @@ static gboolean s5_canwrite(gpointer data, gint source, b_input_condition cond)
unsigned char buf[512];
int i;
struct PHB *phb = data;
- unsigned int len;
+ socklen_t len;
int error = ETIMEDOUT;
if (phb->inpa > 0)
b_event_remove(phb->inpa);
diff --git a/protocols/oscar/conn.c b/protocols/oscar/conn.c
index a178761e..16b6ac07 100644
--- a/protocols/oscar/conn.c
+++ b/protocols/oscar/conn.c
@@ -570,7 +570,7 @@ int aim_conn_completeconnect(aim_session_t *sess, aim_conn_t *conn)
}
if (FD_ISSET(conn->fd, &fds) || FD_ISSET(conn->fd, &wfds)) {
- unsigned int len = sizeof(error);
+ socklen_t len = sizeof(error);
if (getsockopt(conn->fd, SOL_SOCKET, SO_ERROR, &error, &len) < 0)
error = errno;
diff --git a/protocols/yahoo/libyahoo2.c b/protocols/yahoo/libyahoo2.c
index cc4724f6..9956514d 100644
--- a/protocols/yahoo/libyahoo2.c
+++ b/protocols/yahoo/libyahoo2.c
@@ -973,7 +973,8 @@ static void yahoo_process_conference(struct yahoo_input_data *yid,
if (pair->key == 14) /* decline/conf message */
msg = pair->value;
- if (pair->key == 13) ;
+ if (pair->key == 13)
+ ;
if (pair->key == 16) /* error */
msg = pair->value;
@@ -1794,9 +1795,9 @@ static enum yahoo_status yahoo_https_status_parse(int code)
{
switch (code)
{
- case 1212: return YAHOO_LOGIN_PASSWD;
- case 1213: return YAHOO_LOGIN_LOCK;
- case 1235: return YAHOO_LOGIN_UNAME;
+ case 1212: return (enum yahoo_status) YAHOO_LOGIN_PASSWD;
+ case 1213: return (enum yahoo_status) YAHOO_LOGIN_LOCK;
+ case 1235: return (enum yahoo_status) YAHOO_LOGIN_UNAME;
default: return (enum yahoo_status) code;
}
}
@@ -3609,7 +3610,7 @@ void yahoo_send_im(int id, const char *from, const char *who, const char *what,
yd = yid->yd;
- pkt = yahoo_packet_new(YAHOO_SERVICE_MESSAGE, YAHOO_STATUS_OFFLINE,
+ pkt = yahoo_packet_new(YAHOO_SERVICE_MESSAGE, (enum ypacket_status) YAHOO_STATUS_OFFLINE,
yd->session_id);
snprintf(pic_str, sizeof(pic_str), "%d", picture);
@@ -3676,7 +3677,7 @@ void yahoo_set_away(int id, enum yahoo_status state, const char *msg, int away)
/* Thank you libpurple :) */
if (yd->current_status == YAHOO_STATUS_INVISIBLE) {
pkt = yahoo_packet_new(YAHOO_SERVICE_Y6_VISIBLE_TOGGLE,
- YAHOO_STATUS_AVAILABLE, 0);
+ (enum ypacket_status) YAHOO_STATUS_AVAILABLE, 0);
yahoo_packet_hash(pkt, 13, "2");
yahoo_send_packet(yid, pkt, 0);
yahoo_packet_free(pkt);
@@ -3695,7 +3696,7 @@ void yahoo_set_away(int id, enum yahoo_status state, const char *msg, int away)
if (old_status == YAHOO_STATUS_INVISIBLE) {
pkt = yahoo_packet_new(YAHOO_SERVICE_Y6_VISIBLE_TOGGLE,
- YAHOO_STATUS_AVAILABLE, 0);
+ (enum ypacket_status) YAHOO_STATUS_AVAILABLE, 0);
yahoo_packet_hash(pkt, 13, "1");
yahoo_send_packet(yid, pkt, 0);
yahoo_packet_free(pkt);
diff --git a/protocols/yahoo/yahoo_util.h b/protocols/yahoo/yahoo_util.h
index 1f55e064..6099bf8f 100644
--- a/protocols/yahoo/yahoo_util.h
+++ b/protocols/yahoo/yahoo_util.h
@@ -47,6 +47,9 @@
# endif
# define snprintf g_snprintf
+#ifdef vsnprintf
+#undef vsnprintf
+#endif
# define vsnprintf g_vsnprintf
#else
diff --git a/tests/check_arc.c b/tests/check_arc.c
index 9d913dcd..e9e7d382 100644
--- a/tests/check_arc.c
+++ b/tests/check_arc.c
@@ -87,6 +87,8 @@ static void check_decod(int l)
len = arc_decode( decrypt_tests[i].crypted, decrypt_tests[i].len,
&decrypted, password );
+ fail_if( len == -1,
+ "`%s' didn't decrypt properly", decrypt_tests[i].decrypted );
fail_if( strcmp( decrypt_tests[i].decrypted, decrypted ) != 0,
"`%s' didn't decrypt properly", decrypt_tests[i].decrypted );
diff --git a/tests/check_irc.c b/tests/check_irc.c
index 66fe0021..a4b9a1e9 100644
--- a/tests/check_irc.c
+++ b/tests/check_irc.c
@@ -27,7 +27,6 @@ END_TEST
START_TEST(test_login)
GIOChannel *ch1, *ch2;
irc_t *irc;
- GError *error = NULL;
char *raw;
fail_unless(g_io_channel_pair(&ch1, &ch2));
diff --git a/tests/check_jabber_sasl.c b/tests/check_jabber_sasl.c
index 63118d39..81fc60aa 100644
--- a/tests/check_jabber_sasl.c
+++ b/tests/check_jabber_sasl.c
@@ -86,7 +86,6 @@ static void check_get_part(int l)
{
tcase_fn_start( get_part_tests[i].key, __FILE__, i );
char *res;
- int len;
res = sasl_get_part( get_part_tests[i].challenge,
get_part_tests[i].key );