diff options
| author | Jason Copenhaver <jcopenha@typedef.org> | 2015-01-16 16:50:24 -0300 | 
|---|---|---|
| committer | dequis <dx@dxzone.com.ar> | 2015-01-16 16:50:24 -0300 | 
| commit | 25c4c78e2ddad482dfc9d5a104f76325fcc2f8e5 (patch) | |
| tree | 4b6628d38e54a55b6059948ff8bad6b3c13b719b /protocols | |
| parent | 7549d0074aa4917e62106ac285b05baa1e76c1e9 (diff) | |
Fix compiler warnings on Cygwin and Mac OS X.
* Don't use PIE/PIC on Cygwin/Darwin unless specified as these
  platforms don't support it.
* Cleanup warnings for 'make check' build.
* Fix the type issue for getsockopt calls.
* Fix enum warnings in Yahoo libs on Mac OS X.
Diffstat (limited to 'protocols')
| -rw-r--r-- | protocols/oscar/conn.c | 2 | ||||
| -rw-r--r-- | protocols/yahoo/libyahoo2.c | 15 | ||||
| -rw-r--r-- | protocols/yahoo/yahoo_util.h | 3 | 
3 files changed, 12 insertions, 8 deletions
| 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 | 
