summaryrefslogtreecommitdiff
path: root/protocols/IcqOscarJ/src/icq_direct.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-12-05 14:50:31 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-12-05 14:50:31 +0000
commitae10177eb1e515eada4aa2b4295aab02d1f7c176 (patch)
treea42597711316c7a9757e3598c48cf76c3fdf4a72 /protocols/IcqOscarJ/src/icq_direct.cpp
parent8961403e3a5002fd284422f8c6ec5a78fdd81816 (diff)
warning fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@11251 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IcqOscarJ/src/icq_direct.cpp')
-rw-r--r--protocols/IcqOscarJ/src/icq_direct.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/protocols/IcqOscarJ/src/icq_direct.cpp b/protocols/IcqOscarJ/src/icq_direct.cpp
index bed952d8fe..959b986015 100644
--- a/protocols/IcqOscarJ/src/icq_direct.cpp
+++ b/protocols/IcqOscarJ/src/icq_direct.cpp
@@ -372,13 +372,13 @@ void __cdecl CIcqProto::icq_directThread(directthreadstartinfo *dtsi)
if (dc.type == DIRECTCONN_CLOSING)
packetRecv.bytesUsed = packetRecv.bytesAvailable;
- else if (packetRecv.bytesAvailable < nSkipPacketBytes) { // the whole buffer needs to be skipped
+ else if (packetRecv.bytesAvailable < (int)nSkipPacketBytes) { // the whole buffer needs to be skipped
nSkipPacketBytes -= packetRecv.bytesAvailable;
packetRecv.bytesUsed = packetRecv.bytesAvailable;
}
else {
size_t i;
- for (i = nSkipPacketBytes, nSkipPacketBytes = 0; i + 2 <= packetRecv.bytesAvailable;) {
+ for (i = nSkipPacketBytes, nSkipPacketBytes = 0; (int)i + 2 <= packetRecv.bytesAvailable;) {
size_t wLen = *(WORD*)(packetRecv.buffer + i);
if (bFirstPacket) {
@@ -389,16 +389,14 @@ void __cdecl CIcqProto::icq_directThread(directthreadstartinfo *dtsi)
}
bFirstPacket = FALSE;
}
- else {
- if (packetRecv.bytesAvailable >= i + 2 && wLen > 8190) { // check for too big packages
- NetLog_Direct("Error: Package too big: %d bytes, skipping.");
- nSkipPacketBytes = wLen;
- packetRecv.bytesUsed = int(i + 2);
- break;
- }
+ else if (packetRecv.bytesAvailable >= (int)i + 2 && wLen > 8190) { // check for too big packages
+ NetLog_Direct("Error: Package too big: %d bytes, skipping.");
+ nSkipPacketBytes = wLen;
+ packetRecv.bytesUsed = int(i + 2);
+ break;
}
- if (wLen + 2 + i > packetRecv.bytesAvailable)
+ if (wLen + 2 + i > (size_t)packetRecv.bytesAvailable)
break;
if (dc.type == DIRECTCONN_STANDARD && wLen && packetRecv.buffer[i + 2] == 2) {