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