chore: Fix a bunch of compile warnings (#2748)

* chore: fix warnings for simu and firmware, part 1

* chore: fix warnings
This commit is contained in:
Malte Langermann
2022-12-05 20:41:42 +10:00
committed by GitHub
parent 7bdb32a8cd
commit d134e1a840
25 changed files with 39 additions and 38 deletions
@@ -372,7 +372,7 @@ void menuRadioSdManager(event_t _event)
break;
case EVT_KEY_LONG(KEY_ENTER):
#if !defined(PCBX9) && !defined(RADIO_X7) && !defined(RADIO_X7ACCESS) // TODO NO_HEADER_LINE
#if (HEADER_LINE > 0) && !defined(PCBX9) && !defined(RADIO_X7) && !defined(RADIO_X7ACCESS) // TODO NO_HEADER_LINE
if (menuVerticalPosition < HEADER_LINE) {
killEvents(_event);
POPUP_MENU_ADD_ITEM(STR_SD_INFO);
@@ -151,8 +151,8 @@ void menuRadioModulesVersion(event_t event)
#if defined(CROSSFIRE)
if (isModuleCrossfire(module)) {
char statusText[64] = "";
sprintf(statusText, "%d Hz %lu Err",
1000000 / getMixerSchedulerPeriod(), telemetryErrors);
sprintf(statusText, "%d Hz %zu Err",
1000000 / getMixerSchedulerPeriod(), (size_t)telemetryErrors);
lcdDrawText(COLUMN2_X, y, statusText);
y += FH;
continue;
+1 -1
View File
@@ -72,7 +72,7 @@ static wchar_t _utf8_lut[] = {
#if !defined(NO_UTF8_LUT)
static unsigned char lookup_utf8_mapping(wchar_t w)
{
for (int i=0; i < DIM(_utf8_lut); i++) {
for (uint32_t i=0; i < DIM(_utf8_lut); i++) {
if (w == _utf8_lut[i])
return 0x95 + (uint8_t)i; // TODO: use constant
}