From 8ce14d040693c16426d0cfe7c904ca2411c80031 Mon Sep 17 00:00:00 2001 From: Renz Bagaporo Date: Fri, 20 Jul 2018 13:25:45 +0800 Subject: [PATCH] console: Suppress unused warning asprintf result --- components/console/commands.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/console/commands.c b/components/console/commands.c index b1f6bda96e..7d7232869b 100644 --- a/components/console/commands.c +++ b/components/console/commands.c @@ -104,7 +104,8 @@ esp_err_t esp_console_cmd_register(const esp_console_cmd_t *cmd) /* Prepend a space before the hint. It separates command name and * the hint. arg_print_syntax below adds this space as well. */ - asprintf(&item->hint, " %s", cmd->hint); + int unused __attribute__((unused)); + unused = asprintf(&item->hint, " %s", cmd->hint); } else if (cmd->argtable) { /* Generate hint based on cmd->argtable */ char *buf = NULL;