Skip to content

Commit 5a34955

Browse files
committed
added type conversion to avoid signed-vs-unsigned-comparison warning
1 parent 05cc830 commit 5a34955

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/cppkafka/utils/buffered_producer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,7 @@ void BufferedProducer<BufferType, Allocator>::do_add_message(BuilderType&& build
811811

812812
// Flush the queues only if a regular message is added. Retry messages may be added
813813
// from rdkafka callbacks, and flush/async_flush is a user-level call
814-
if (queue_kind == QueueKind::Regular && flush_action == FlushAction::DoFlush && (max_buffer_size_ >= 0) && (max_buffer_size_ <= get_buffer_size())) {
814+
if (queue_kind == QueueKind::Regular && flush_action == FlushAction::DoFlush && (max_buffer_size_ >= 0) && (max_buffer_size_ <= (ssize_t)get_buffer_size())) {
815815
if (flush_method_ == FlushMethod::Sync) {
816816
flush();
817817
}

0 commit comments

Comments
 (0)