File centerim-fix-compiler-warnings.patch of Package centerim
Index: centerim-4.22.10/libicq2000/src/Client.cpp
===================================================================
--- centerim-4.22.10.orig/libicq2000/src/Client.cpp
+++ centerim-4.22.10/libicq2000/src/Client.cpp
@@ -194,12 +194,14 @@ namespace ICQ2000
}
unsigned short Client::NextSeqNum() {
- m_client_seq_num = ++m_client_seq_num & 0x7fff;
+ m_client_seq_num++;
+ m_client_seq_num &= 0x7fff;
return m_client_seq_num;
}
unsigned int Client::NextRequestID() {
- m_requestid = ++m_requestid & 0x7fffffff;
+ m_requestid++;
+ m_requestid &= 0x7fffffff;
return m_requestid;
}
Index: centerim-4.22.10/libjabber/xstream.c
===================================================================
--- centerim-4.22.10.orig/libjabber/xstream.c
+++ centerim-4.22.10/libjabber/xstream.c
@@ -18,6 +18,9 @@
*/
#include <libxode.h>
+#include <stdio.h>
+#include <time.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 */
Index: centerim-4.22.10/libicq2000/src/buffer.cpp
===================================================================
--- centerim-4.22.10.orig/libicq2000/src/buffer.cpp
+++ centerim-4.22.10/libicq2000/src/buffer.cpp
@@ -288,11 +288,13 @@ namespace ICQ2000
m_out_pos += 2;
} else {
if (m_endn == BIG) {
- l = ((unsigned short)m_data[m_out_pos++] << 8)
- + ((unsigned short)m_data[m_out_pos++]);
+ l = ((unsigned short)m_data[m_out_pos] << 8)
+ + ((unsigned short)m_data[m_out_pos+1]);
+ m_out_pos += 2;
} else {
- l = ((unsigned short)m_data[m_out_pos++])
- + ((unsigned short)m_data[m_out_pos++] << 8);
+ l = ((unsigned short)m_data[m_out_pos])
+ + ((unsigned short)m_data[m_out_pos+1] << 8);
+ m_out_pos += 2;
}
}
return (*this);
@@ -309,17 +311,19 @@ namespace ICQ2000
{
if (m_endn == BIG)
{
- l = ((unsigned int)m_data[m_out_pos++] << 24)
- + ((unsigned int)m_data[m_out_pos++] << 16)
- + ((unsigned int)m_data[m_out_pos++] << 8)
- + ((unsigned int)m_data[m_out_pos++]);
+ l = ((unsigned int)m_data[m_out_pos] << 24)
+ + ((unsigned int)m_data[m_out_pos+1] << 16)
+ + ((unsigned int)m_data[m_out_pos+2] << 8)
+ + ((unsigned int)m_data[m_out_pos+3]);
+ m_out_pos += 4;
}
else
{
- l = ((unsigned int)m_data[m_out_pos++])
- + ((unsigned int)m_data[m_out_pos++] << 8)
- + ((unsigned int)m_data[m_out_pos++] << 16)
- + ((unsigned int)m_data[m_out_pos++] << 24);
+ l = ((unsigned int)m_data[m_out_pos])
+ + ((unsigned int)m_data[m_out_pos+1] << 8)
+ + ((unsigned int)m_data[m_out_pos+2] << 16)
+ + ((unsigned int)m_data[m_out_pos+3] << 24);
+ m_out_pos += 4;
}
}
return (*this);
Index: centerim-4.22.10/libjabber/jconn.c
===================================================================
--- centerim-4.22.10.orig/libjabber/jconn.c
+++ centerim-4.22.10/libjabber/jconn.c
@@ -824,7 +824,7 @@ void *jabber_recieve_file_fd(void *arg)
free(hash);
close(sock);
close(fd_file);
- return;
+ return NULL;
}
recv( sock, buff, SEND_BUF, 0 );
@@ -833,7 +833,7 @@ void *jabber_recieve_file_fd(void *arg)
free(hash);
close(sock);
close(fd_file);
- return;
+ return NULL;
}
//socks5 bytestream packet
@@ -851,7 +851,7 @@ void *jabber_recieve_file_fd(void *arg)
free(hash);
close(sock);
close(fd_file);
- return;
+ return NULL;
}
recv( sock, buff, 47, 0 );
if( buff[0] != 0x05 || buff[3] != 0x03 )
@@ -859,7 +859,7 @@ void *jabber_recieve_file_fd(void *arg)
free(hash);
close(sock);
close(fd_file);
- return;
+ return NULL;
}
Index: centerim-4.22.10/src/hooks/yahoohook.cc
===================================================================
--- centerim-4.22.10.orig/src/hooks/yahoohook.cc
+++ centerim-4.22.10/src/hooks/yahoohook.cc
@@ -774,25 +774,25 @@ void yahoohook::login_response(int id, i
break;
case YAHOO_LOGIN_LOGOFF:
- yhook.fonline = yhook.fonline = false;
+ yhook.fonline = false;
yahoo_close(yhook.cid);
face.log(_("+ [yahoo] cannot login"));
break;
case YAHOO_LOGIN_PASSWD:
- yhook.fonline = yhook.fonline = false;
+ yhook.fonline = false;
yahoo_close(yhook.cid);
face.log(_("+ [yahoo] cannot login: username and password mismatch"));
break;
case YAHOO_LOGIN_UNAME:
- yhook.fonline = yhook.fonline = false;
+ yhook.fonline = false;
yahoo_close(yhook.cid);
face.log(_("+ [yahoo] cannot login: username doesn't exist"));
break;
case YAHOO_LOGIN_LOCK:
- yhook.fonline = yhook.fonline = false;
+ yhook.fonline = false;
yahoo_close(yhook.cid);
face.log(_("+ [yahoo] cannot login: the account has been blocked"));
face.log(_("+ to reactivate visit %s"), url);
Index: centerim-4.22.10/libicq2000/libicq2000/sigslot.h
===================================================================
--- centerim-4.22.10.orig/libicq2000/libicq2000/sigslot.h
+++ centerim-4.22.10/libicq2000/libicq2000/sigslot.h
@@ -84,6 +84,7 @@
#include <set>
#include <list>
+#include <cstdlib>
#if defined(SIGSLOT_PURE_ISO) || (!defined(WIN32) && !defined(SIGSLOT_USE_POSIX_THREADS))
# define _SIGSLOT_SINGLE_THREADED