added type conversion to avoid signed-vs-unsigned-comparison warning

This commit is contained in:
demin80
2019-01-16 10:52:14 -05:00
parent 05cc8304df
commit 5a34955fae

View File

@@ -811,7 +811,7 @@ void BufferedProducer<BufferType, Allocator>::do_add_message(BuilderType&& build
// Flush the queues only if a regular message is added. Retry messages may be added
// from rdkafka callbacks, and flush/async_flush is a user-level call
if (queue_kind == QueueKind::Regular && flush_action == FlushAction::DoFlush && (max_buffer_size_ >= 0) && (max_buffer_size_ <= get_buffer_size())) {
if (queue_kind == QueueKind::Regular && flush_action == FlushAction::DoFlush && (max_buffer_size_ >= 0) && (max_buffer_size_ <= (ssize_t)get_buffer_size())) {
if (flush_method_ == FlushMethod::Sync) {
flush();
}