diff --git a/src/main/cms/cms.c b/src/main/cms/cms.c index 6590dfe880..adfff74f9e 100644 --- a/src/main/cms/cms.c +++ b/src/main/cms/cms.c @@ -261,7 +261,7 @@ static void cmsPadToSize(char *buf, int size) static int cmsDrawMenuEntry(displayPort_t *pDisplay, OSD_Entry *p, uint8_t row) { - #define CMS_DRAW_BUFFER_LEN 10 + #define CMS_DRAW_BUFFER_LEN 10u char buff[CMS_DRAW_BUFFER_LEN]; int cnt = 0; diff --git a/src/main/fc/cli.c b/src/main/fc/cli.c index b5ac83443a..100fc4fbd1 100755 --- a/src/main/fc/cli.c +++ b/src/main/fc/cli.c @@ -1924,7 +1924,7 @@ static void printName(uint8_t dumpMask, const pilotConfig_t *pilotConfig) static void cliName(char *cmdline) { - const uint32_t len = strlen(cmdline); + const int len = strlen(cmdline); if (len > 0) { memset(pilotConfigMutable()->name, 0, ARRAYLEN(pilotConfig()->name)); if (strncmp(cmdline, emptyName, len)) { diff --git a/src/main/io/asyncfatfs/asyncfatfs.c b/src/main/io/asyncfatfs/asyncfatfs.c index 8d66170021..d8d5c3cf2c 100644 --- a/src/main/io/asyncfatfs/asyncfatfs.c +++ b/src/main/io/asyncfatfs/asyncfatfs.c @@ -928,7 +928,7 @@ static afatfsOperationStatus_e afatfs_cacheSector(uint32_t physicalSectorIndex, if (eraseCount < AFATFS_MIN_MULTIPLE_BLOCK_WRITE_COUNT) { eraseCount = 0; } else { - eraseCount = MIN(eraseCount, UINT16_MAX); // If caller asked for a longer chain of sectors we silently truncate that here + eraseCount = MIN(eraseCount, (uint32_t)UINT16_MAX); // If caller asked for a longer chain of sectors we silently truncate that here } afatfs.cacheDescriptor[cacheSectorIndex].consecutiveEraseBlockCount = eraseCount; diff --git a/src/main/io/dashboard.c b/src/main/io/dashboard.c index 33275acf97..c12b240eca 100644 --- a/src/main/io/dashboard.c +++ b/src/main/io/dashboard.c @@ -366,7 +366,7 @@ static void showGpsPage() i2c_OLED_set_xy(bus, 0, rowIndex); i2c_OLED_send_char(bus, tickerCharacters[gpsTicker]); - i2c_OLED_set_xy(bus, MAX(0, SATELLITE_GRAPH_LEFT_OFFSET), rowIndex++); + i2c_OLED_set_xy(bus, MAX(0, (uint8_t)SATELLITE_GRAPH_LEFT_OFFSET), rowIndex++); uint32_t index; for (index = 0; index < SATELLITE_COUNT && index < SCREEN_CHARACTER_COLUMN_COUNT; index++) { diff --git a/src/main/scheduler/scheduler.c b/src/main/scheduler/scheduler.c index 6e70f4322f..89aba89529 100755 --- a/src/main/scheduler/scheduler.c +++ b/src/main/scheduler/scheduler.c @@ -166,10 +166,10 @@ void rescheduleTask(cfTaskId_e taskId, uint32_t newPeriodMicros) { if (taskId == TASK_SELF) { cfTask_t *task = currentTask; - task->desiredPeriod = MAX(SCHEDULER_DELAY_LIMIT, newPeriodMicros); // Limit delay to 100us (10 kHz) to prevent scheduler clogging + task->desiredPeriod = MAX(SCHEDULER_DELAY_LIMIT, (timeDelta_t)newPeriodMicros); // Limit delay to 100us (10 kHz) to prevent scheduler clogging } else if (taskId < TASK_COUNT) { cfTask_t *task = &cfTasks[taskId]; - task->desiredPeriod = MAX(SCHEDULER_DELAY_LIMIT, newPeriodMicros); // Limit delay to 100us (10 kHz) to prevent scheduler clogging + task->desiredPeriod = MAX(SCHEDULER_DELAY_LIMIT, (timeDelta_t)newPeriodMicros); // Limit delay to 100us (10 kHz) to prevent scheduler clogging } }