Remove unused pointes if SKIP_CLI_COMMAND_HELP is defiend
This commit is contained in:
parent
7a1342bce5
commit
4e86cd01eb
|
@ -204,9 +204,10 @@ static const char * const sensorHardwareNames[4][11] = {
|
|||
|
||||
typedef struct {
|
||||
const char *name;
|
||||
#ifndef SKIP_CLI_COMMAND_HELP
|
||||
const char *description;
|
||||
const char *args;
|
||||
|
||||
#endif
|
||||
void (*func)(char *cmdline);
|
||||
} clicmd_t;
|
||||
|
||||
|
@ -222,8 +223,6 @@ typedef struct {
|
|||
#define CLI_COMMAND_DEF(name, description, args, method) \
|
||||
{ \
|
||||
name, \
|
||||
NULL, \
|
||||
NULL, \
|
||||
method \
|
||||
}
|
||||
#endif
|
||||
|
@ -1710,12 +1709,14 @@ static void cliHelp(char *cmdline)
|
|||
|
||||
for (i = 0; i < CMD_COUNT; i++) {
|
||||
cliPrint(cmdTable[i].name);
|
||||
#ifndef SKIP_CLI_COMMAND_HELP
|
||||
if (cmdTable[i].description) {
|
||||
printf(" - %s", cmdTable[i].description);
|
||||
}
|
||||
if (cmdTable[i].args) {
|
||||
printf("\r\n\t%s", cmdTable[i].args);
|
||||
}
|
||||
#endif
|
||||
cliPrint("\r\n");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue