Mercurial > hg
changeset 235:f7f07794d2df
[/trunk] Changeset 248 by mikael
* Try to kill some warnings
author | mikael |
---|---|
date | Fri, 10 Jun 2005 18:42:38 +0000 |
parents | 16793da74564 |
children | 72fd1273f2b7 |
files | mcabber/connwrap/connwrap.c mcabber/connwrap/connwrap.h mcabber/libjabber/xmlparse.c mcabber/libjabber/xstream.c |
diffstat | 4 files changed, 13 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/mcabber/connwrap/connwrap.c Fri Jun 10 17:52:44 2005 +0000 +++ b/mcabber/connwrap/connwrap.c Fri Jun 10 18:42:38 2005 +0000 @@ -277,7 +277,7 @@ rc = cw_connect(sockfd, serv_addr, addrlen, 0); else{ /* check if the socket is connected correctly */ int optlen = sizeof(int), optval; - if (getsockopt(sockfd, SOL_SOCKET, SO_ERROR, &optval, &optlen) || optval) + if (getsockopt(sockfd, SOL_SOCKET, SO_ERROR, &optval, (socklen_t*)&optlen) || optval) return -1; } @@ -322,7 +322,7 @@ rc = connect(sockfd, serv_addr, addrlen); else{ /* check if the socket is connected correctly */ int optlen = sizeof(int), optval; - if (getsockopt(sockfd, SOL_SOCKET, SO_ERROR, &optval, &optlen) || optval) + if (getsockopt(sockfd, SOL_SOCKET, SO_ERROR, &optval, (socklen_t*)&optlen) || optval) return -1; *state = 0; return 0; @@ -340,7 +340,7 @@ int rc; if(ssl) { - rc = accept(s, addr, addrlen); + rc = accept(s, addr, (socklen_t*)addrlen); if(!rc) { sslsock *p = addsock(s); @@ -352,7 +352,7 @@ return rc; } #endif - return accept(s, addr, addrlen); + return accept(s, addr, (socklen_t*)addrlen); } int cw_write(int fd, const void *buf, int count, int ssl) { @@ -360,7 +360,7 @@ sslsock *p; if(ssl) - if(p = getsock(fd)) + if((p = getsock(fd)) != NULL) return SSL_write(p->ssl, buf, count); #endif return write(fd, buf, count); @@ -371,13 +371,13 @@ sslsock *p; if(ssl) - if(p = getsock(fd)) + if((p = getsock(fd)) != NULL) return SSL_read(p->ssl, buf, count); #endif return read(fd, buf, count); } -int cw_close(int fd) { +void cw_close(int fd) { #ifdef HAVE_OPENSSL delsock(fd); #endif
--- a/mcabber/connwrap/connwrap.h Fri Jun 10 17:52:44 2005 +0000 +++ b/mcabber/connwrap/connwrap.h Fri Jun 10 18:42:38 2005 +0000 @@ -32,7 +32,7 @@ int cw_write(int fd, const void *buf, int count, int ssl); int cw_read(int fd, void *buf, int count, int ssl); -int cw_close(int fd); +void cw_close(int fd); void cw_setproxy(const char *aproxyhost, int aproxyport, const char *aproxyuser, const char *aproxypass); void cw_setbind(const char *abindaddr);
--- a/mcabber/libjabber/xmlparse.c Fri Jun 10 17:52:44 2005 +0000 +++ b/mcabber/libjabber/xmlparse.c Fri Jun 10 18:42:38 2005 +0000 @@ -190,7 +190,7 @@ static Processor contentProcessor; static Processor cdataSectionProcessor; static Processor epilogProcessor; -static Processor errorProcessor; +/* static Processor errorProcessor; */ static Processor externalEntityInitProcessor; static Processor externalEntityInitProcessor2; static Processor externalEntityInitProcessor3; @@ -2333,6 +2333,7 @@ } } +/* static enum XML_Error errorProcessor(XML_Parser parser, const char *s, @@ -2341,6 +2342,7 @@ { return errorCode; } +*/ static enum XML_Error storeAttributeValue(XML_Parser parser, const ENCODING *enc, int isCdata, @@ -2483,7 +2485,7 @@ const char *entityTextPtr, const char *entityTextEnd) { - const ENCODING *internalEnc = ns ? XmlGetInternalEncodingNS() : XmlGetInternalEncoding(); + /* const ENCODING *internalEnc = ns ? XmlGetInternalEncodingNS() : XmlGetInternalEncoding(); */ STRING_POOL *pool = &(dtd.pool); entityTextPtr += encoding->minBytesPerChar; entityTextEnd -= encoding->minBytesPerChar;
--- a/mcabber/libjabber/xstream.c Fri Jun 10 17:52:44 2005 +0000 +++ b/mcabber/libjabber/xstream.c Fri Jun 10 18:42:38 2005 +0000 @@ -17,6 +17,7 @@ * Copyright (C) 1998-1999 The Jabber Team http://jabber.org/ */ +#include <time.h> #include <libxode.h> /* xstream is a way to have a consistent method of handling incoming XML Stream based events... it doesn't handle the generation of an XML Stream, but provides some facilities to help do that */