From d31b31787c50a1fbda110cbabfa7e2c4b9b44eaa Mon Sep 17 00:00:00 2001 From: Renz Bagaporo Date: Wed, 27 Jun 2018 20:47:30 +0800 Subject: [PATCH 1/3] spiffs: Explicitly indicate unused value --- components/spiffs/spiffs_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/spiffs/spiffs_api.c b/components/spiffs/spiffs_api.c index 6dd3db9637..39fcabbd94 100644 --- a/components/spiffs/spiffs_api.c +++ b/components/spiffs/spiffs_api.c @@ -23,7 +23,7 @@ const char* TAG = "SPIFFS"; void spiffs_api_lock(spiffs *fs) { - xSemaphoreTake(((esp_spiffs_t *)(fs->user_data))->lock, portMAX_DELAY); + (void) xSemaphoreTake(((esp_spiffs_t *)(fs->user_data))->lock, portMAX_DELAY); } void spiffs_api_unlock(spiffs *fs) From 4355eb1bc2e8d01f54187fa14b833b2ebde782bb Mon Sep 17 00:00:00 2001 From: Renz Bagaporo Date: Thu, 12 Jul 2018 08:48:27 +0800 Subject: [PATCH 2/3] console: Ignore var cloberred warning for argtable --- components/console/argtable3/argtable3.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/console/argtable3/argtable3.c b/components/console/argtable3/argtable3.c index 282869f9c0..43464d396e 100644 --- a/components/console/argtable3/argtable3.c +++ b/components/console/argtable3/argtable3.c @@ -30,6 +30,8 @@ #include "argtable3.h" +#pragma GCC diagnostic ignored "-Wclobbered" + /******************************************************************************* * This file is part of the argtable3 library. * From 8ce14d040693c16426d0cfe7c904ca2411c80031 Mon Sep 17 00:00:00 2001 From: Renz Bagaporo Date: Fri, 20 Jul 2018 13:25:45 +0800 Subject: [PATCH 3/3] 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;