From c1f922ce1470557e73fee1517cb28f18d3f0b2bd Mon Sep 17 00:00:00 2001 From: Raphael Coeffic Date: Sat, 17 Sep 2022 09:03:55 +0200 Subject: [PATCH] chore(DynamicNumber): remove type argument warnings --- radio/src/thirdparty/libopenui/src/static.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/radio/src/thirdparty/libopenui/src/static.cpp b/radio/src/thirdparty/libopenui/src/static.cpp index d64c6466a..59bd58bc4 100644 --- a/radio/src/thirdparty/libopenui/src/static.cpp +++ b/radio/src/thirdparty/libopenui/src/static.cpp @@ -119,10 +119,10 @@ void DynamicNumber::updateText() const char* s = suffix ? suffix : ""; if ((textFlags & PREC2) == PREC2) { lv_label_set_text_fmt(lvobj, "%s%" PRIu16 ".%02" PRIu16 "%s", p, - value / 100, value % 100, s); + (uint16_t)(value / 100), (uint16_t)(value % 100), s); } else if (textFlags & PREC1) { lv_label_set_text_fmt(lvobj, "%s%" PRIu16 ".%01" PRIu16 "%s", p, - value / 10, value % 10, s); + (uint16_t)(value / 10), (uint16_t)(value % 10), s); } else { lv_label_set_text_fmt(lvobj, "%s%" PRIu16 "%s", p, value, s); } @@ -137,10 +137,10 @@ void DynamicNumber::updateText() const char* s = suffix ? suffix : ""; if ((textFlags & PREC2) == PREC2) { lv_label_set_text_fmt(lvobj, "%s%" PRId16 ".%02" PRId16 "%s", p, - value / 100, value % 100, s); + (int16_t)(value / 100), (int16_t)(value % 100), s); } else if (textFlags & PREC1) { lv_label_set_text_fmt(lvobj, "%s%" PRId16 ".%01" PRId16 "%s", p, - value / 10, value % 10, s); + (int16_t)(value / 10), (int16_t)(value % 10), s); } else { lv_label_set_text_fmt(lvobj, "%s%" PRId16 "%s", p, value, s); }