From c0db1a3625c10c74f3ea016f57d88822bb350a91 Mon Sep 17 00:00:00 2001 From: Alexander Malishev Date: Sat, 30 Jun 2018 00:40:55 +0400 Subject: [PATCH] AP_OSD: fix warnings --- libraries/AP_OSD/AP_OSD_Screen.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_OSD/AP_OSD_Screen.cpp b/libraries/AP_OSD/AP_OSD_Screen.cpp index 489f8ae922..0843f11643 100644 --- a/libraries/AP_OSD/AP_OSD_Screen.cpp +++ b/libraries/AP_OSD/AP_OSD_Screen.cpp @@ -220,8 +220,8 @@ void AP_OSD_Screen::draw_message(uint8_t x, uint8_t y) int16_t end_position = start_position + message_visible_width; //ensure array boundaries - start_position = MIN(start_position, sizeof(buffer)-1); - end_position = MIN(end_position, sizeof(buffer)-1); + start_position = MIN(start_position, int(sizeof(buffer)-1)); + end_position = MIN(end_position, int(sizeof(buffer)-1)); //trim invisible part buffer[end_position] = 0;