summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ByteBuffer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ByteBuffer.cpp b/src/ByteBuffer.cpp
index 510018005..e06f63a0e 100644
--- a/src/ByteBuffer.cpp
+++ b/src/ByteBuffer.cpp
@@ -781,7 +781,8 @@ bool cByteBuffer::ReadToByteBuffer(cByteBuffer & a_Dst, size_t a_NumBytes)
return false;
}
char buf[1024];
- while (a_NumBytes > static_cast<size_t>(0))
+ // > 0 without generating warnings about unsigned comparisons where size_t is unsigned
+ while (a_NumBytes != 0)
{
size_t num = (a_NumBytes > sizeof(buf)) ? sizeof(buf) : a_NumBytes;
VERIFY(ReadBuf(buf, num));