Remove unused pointes if SKIP_CLI_COMMAND_HELP is defiend

This commit is contained in:
Petr Ledvina 2015-10-09 13:16:34 +02:00 committed by Dominic Clifton
parent bea9ae729e
commit fcc9556610
1 changed files with 4 additions and 3 deletions

View File

@ -199,9 +199,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;
@ -217,8 +218,6 @@ typedef struct {
#define CLI_COMMAND_DEF(name, description, args, method) \
{ \
name, \
NULL, \
NULL, \
method \
}
#endif
@ -1704,12 +1703,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");
}
}