From dd98ed565e45d0bb0043c891ad15583e16431a06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Wed, 4 Oct 2017 14:13:14 +0200 Subject: [PATCH] protocol_splitter: fix type comparison --- src/drivers/protocol_splitter/protocol_splitter.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/drivers/protocol_splitter/protocol_splitter.cpp b/src/drivers/protocol_splitter/protocol_splitter.cpp index 4d9521f5ab..a0f5c990a9 100644 --- a/src/drivers/protocol_splitter/protocol_splitter.cpp +++ b/src/drivers/protocol_splitter/protocol_splitter.cpp @@ -384,7 +384,7 @@ ssize_t Mavlink2Dev::write(struct file *filp, const char *buffer, size_t buflen) int buf_free; ::ioctl(_fd, FIONSPACE, (unsigned long)&buf_free); - if (buf_free < buflen) { + if (buf_free < (int)buflen) { //let write fail, to let mavlink know the buffer would overflow //(this is because in the ioctl we pretend there is always enough space) ret = -1; @@ -617,4 +617,3 @@ out: PX4_ERR("unrecognized command, try 'start ', 'stop', 'status'"); return 1; } -