summaryrefslogtreecommitdiffstats
path: root/kdecore
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-12-04 09:03:25 -0600
committerSlávek Banko <slavek.banko@axis.cz>2017-07-22 15:56:41 +0200
commitfc073bef59b83a10ca17c82fe19771f5edee321d (patch)
tree67aab4e0d5a4e2d9db3e43bc3fb272b500267b4f /kdecore
parentd16c4300eb9a917ff477f96e6f81c7887c88b0e0 (diff)
downloadtdelibs-fc073bef59b83a10ca17c82fe19771f5edee321d.tar.gz
tdelibs-fc073bef59b83a10ca17c82fe19771f5edee321d.zip
Fix a number of build warnings
(cherry picked from commit e0b1bfb0140e1d484f71683e820731abdd0779d5)
Diffstat (limited to 'kdecore')
-rw-r--r--kdecore/network/khttpproxysocketdevice.cpp9
-rw-r--r--kdecore/network/kserversocket.cpp2
-rw-r--r--kdecore/network/ksocketbuffer.cpp11
3 files changed, 13 insertions, 9 deletions
diff --git a/kdecore/network/khttpproxysocketdevice.cpp b/kdecore/network/khttpproxysocketdevice.cpp
index f61559bfb..d6bdcc7da 100644
--- a/kdecore/network/khttpproxysocketdevice.cpp
+++ b/kdecore/network/khttpproxysocketdevice.cpp
@@ -170,11 +170,14 @@ bool KHttpProxySocketDevice::connect(const TQString& node, const TQString& servi
bool KHttpProxySocketDevice::parseServerReply()
{
// make sure we're connected
- if (!KSocketDevice::connect(d->proxy))
- if (error() == InProgress)
+ if (!KSocketDevice::connect(d->proxy)) {
+ if (error() == InProgress) {
return true;
- else if (error() != NoError)
+ }
+ else if (error() != NoError) {
return false;
+ }
+ }
if (!d->request.isEmpty())
{
diff --git a/kdecore/network/kserversocket.cpp b/kdecore/network/kserversocket.cpp
index 49facb12c..6c1d3e5d7 100644
--- a/kdecore/network/kserversocket.cpp
+++ b/kdecore/network/kserversocket.cpp
@@ -292,7 +292,7 @@ KActiveSocketBase* KServerSocket::accept()
}
else if (!listen())
// error happened during listen
- return false;
+ return 0L;
}
// check to see if we're doing a timeout
diff --git a/kdecore/network/ksocketbuffer.cpp b/kdecore/network/ksocketbuffer.cpp
index aacffde45..e8f355ae7 100644
--- a/kdecore/network/ksocketbuffer.cpp
+++ b/kdecore/network/ksocketbuffer.cpp
@@ -183,7 +183,7 @@ TQ_LONG KSocketBuffer::consumeBuffer(char *destbuffer, TQ_LONG maxlen, bool disc
{
// calculate how much we'll copy
size_t to_copy = (*it).size() - offset;
- if (to_copy > maxlen)
+ if (to_copy > (size_t)maxlen)
to_copy = maxlen;
// do the copying
@@ -234,12 +234,12 @@ TQ_LONG KSocketBuffer::sendTo(KActiveSocketBase* dev, TQ_LONG len)
return 0;
TQMutexLocker locker(&m_mutex);
-
+
TQValueListIterator<TQByteArray> it = m_list.begin(),
end = m_list.end();
TQIODevice::Offset offset = m_offset;
TQ_LONG written = 0;
-
+
// walk the buffer
while (it != end && (len || len == -1))
{
@@ -249,8 +249,9 @@ TQ_LONG KSocketBuffer::sendTo(KActiveSocketBase* dev, TQ_LONG len)
// question is: how big should that buffer be? 2 kB should be enough
TQ_ULONG bufsize = 1460;
- if (len != -1 && len < bufsize)
+ if ((len != -1) && ((TQ_ULONG)len < bufsize)) {
bufsize = len;
+ }
TQByteArray buf(bufsize);
TQ_LONG count = 0;
@@ -263,7 +264,7 @@ TQ_LONG KSocketBuffer::sendTo(KActiveSocketBase* dev, TQ_LONG len)
}
// see if we can still fit more
- if (count < bufsize && it != end)
+ if ((TQ_ULONG)count < bufsize && it != end)
{
// getting here means this buffer (*it) is larger than
// (bufsize - count) (even for count == 0).