mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 22:35:23 +03:00
Merge pull request #3865 from martinbudden/bf_type_comarisons
Fixed some comparison sign warnings
This commit is contained in:
commit
e058fe697c
3 changed files with 3 additions and 3 deletions
|
@ -1924,7 +1924,7 @@ static void printName(uint8_t dumpMask, const pilotConfig_t *pilotConfig)
|
||||||
|
|
||||||
static void cliName(char *cmdline)
|
static void cliName(char *cmdline)
|
||||||
{
|
{
|
||||||
const int len = strlen(cmdline);
|
const unsigned int len = strlen(cmdline);
|
||||||
if (len > 0) {
|
if (len > 0) {
|
||||||
memset(pilotConfigMutable()->name, 0, ARRAYLEN(pilotConfig()->name));
|
memset(pilotConfigMutable()->name, 0, ARRAYLEN(pilotConfig()->name));
|
||||||
if (strncmp(cmdline, emptyName, len)) {
|
if (strncmp(cmdline, emptyName, len)) {
|
||||||
|
|
|
@ -58,7 +58,7 @@ typedef enum {
|
||||||
FEATURE_DYNAMIC_FILTER = 1 << 29,
|
FEATURE_DYNAMIC_FILTER = 1 << 29,
|
||||||
} features_e;
|
} features_e;
|
||||||
|
|
||||||
#define MAX_NAME_LENGTH 16
|
#define MAX_NAME_LENGTH 16u
|
||||||
typedef struct pilotConfig_s {
|
typedef struct pilotConfig_s {
|
||||||
char name[MAX_NAME_LENGTH + 1];
|
char name[MAX_NAME_LENGTH + 1];
|
||||||
} pilotConfig_t;
|
} pilotConfig_t;
|
||||||
|
|
|
@ -452,7 +452,7 @@ static void osdDrawSingleElement(uint8_t item)
|
||||||
if (strlen(pilotConfig()->name) == 0)
|
if (strlen(pilotConfig()->name) == 0)
|
||||||
strcpy(buff, "CRAFT_NAME");
|
strcpy(buff, "CRAFT_NAME");
|
||||||
else {
|
else {
|
||||||
for (int i = 0; i < MAX_NAME_LENGTH; i++) {
|
for (unsigned int i = 0; i < MAX_NAME_LENGTH; i++) {
|
||||||
buff[i] = toupper((unsigned char)pilotConfig()->name[i]);
|
buff[i] = toupper((unsigned char)pilotConfig()->name[i]);
|
||||||
if (pilotConfig()->name[i] == 0)
|
if (pilotConfig()->name[i] == 0)
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue