You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, compiling under GCC for ESP32 (idf version 4.4) produces a warning:
../components/cli/SimpleCLI/src/c/cmd.c: In function 'cmd_parse':
../components/cli/SimpleCLI/src/c/cmd.c:258:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (prefix != '-') {
^
../components/cli/SimpleCLI/src/c/cmd.c:264:13: note: here
case ARG_DEFAULT:
The problem is here:
switch (a->mode) {
// Anonym, Template Arg -> value = value
case ARG_POS:
if (prefix != '-') {
arg_set_value(a, w->str, w->len);
break;
}
// Default Arg -> value in next word
case ARG_DEFAULT:
Since case ARG_POS doesn't break by default. Should there be a break in line 262 in SimpleCLI/src/c/cmd.c ?
The text was updated successfully, but these errors were encountered:
If I remember correctly, it's intended to fall through. So that you can create a command with a positional argument and successfully parse both command value and command -arg value.
Hi, compiling under GCC for ESP32 (idf version 4.4) produces a warning:
The problem is here:
Since
case ARG_POS
doesn'tbreak
by default. Should there be abreak
in line 262 inSimpleCLI/src/c/cmd.c
?The text was updated successfully, but these errors were encountered: