Преглед на файлове

Merge branch 'bugfix/unused_tag_string' into 'release/v4.4'

build: fix unused tag string (v4.4)

See merge request espressif/esp-idf!16838
Anton Maklakov преди 4 години
родител
ревизия
e0968e506c

+ 3 - 3
components/driver/ledc.c

@@ -63,9 +63,9 @@ static portMUX_TYPE ledc_spinlock = portMUX_INITIALIZER_UNLOCKED;
 #define LEDC_FADE_TOO_SLOW_STR    "LEDC FADE TOO SLOW"
 #define LEDC_FADE_TOO_FAST_STR    "LEDC FADE TOO FAST"
 
-static const char *LEDC_NOT_INIT = "LEDC is not initialized";
-static const char *LEDC_FADE_SERVICE_ERR_STR = "LEDC fade service not installed";
-static const char *LEDC_FADE_INIT_ERROR_STR = "LEDC fade channel init error, not enough memory or service not installed";
+static __attribute__((unused)) const char *LEDC_NOT_INIT = "LEDC is not initialized";
+static __attribute__((unused)) const char *LEDC_FADE_SERVICE_ERR_STR = "LEDC fade service not installed";
+static __attribute__((unused)) const char *LEDC_FADE_INIT_ERROR_STR = "LEDC fade channel init error, not enough memory or service not installed";
 
 //This value will be calibrated when in use.
 static uint32_t s_ledc_slow_clk_8M = 0;

+ 8 - 0
components/esp_common/include/esp_check.h

@@ -25,6 +25,7 @@ extern "C" {
  */
 #if defined(CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT)
 #define ESP_RETURN_ON_ERROR(x, log_tag, format, ...) do {                                       \
+        (void)log_tag;                                                                          \
         esp_err_t err_rc_ = (x);                                                                \
         if (unlikely(err_rc_ != ESP_OK)) {                                                      \
             return err_rc_;                                                                     \
@@ -35,6 +36,7 @@ extern "C" {
  * A version of ESP_RETURN_ON_ERROR() macro that can be called from ISR.
  */
 #define ESP_RETURN_ON_ERROR_ISR(x, log_tag, format, ...) do {                                   \
+        (void)log_tag;                                                                          \
         esp_err_t err_rc_ = (x);                                                                \
         if (unlikely(err_rc_ != ESP_OK)) {                                                      \
             return err_rc_;                                                                     \
@@ -46,6 +48,7 @@ extern "C" {
  * sets the local variable 'ret' to the code, and then exits by jumping to 'goto_tag'.
  */
 #define ESP_GOTO_ON_ERROR(x, goto_tag, log_tag, format, ...) do {                               \
+        (void)log_tag;                                                                          \
         esp_err_t err_rc_ = (x);                                                                \
         if (unlikely(err_rc_ != ESP_OK)) {                                                      \
             ret = err_rc_;                                                                      \
@@ -57,6 +60,7 @@ extern "C" {
  * A version of ESP_GOTO_ON_ERROR() macro that can be called from ISR.
  */
 #define ESP_GOTO_ON_ERROR_ISR(x, goto_tag, log_tag, format, ...) do {                           \
+        (void)log_tag;                                                                          \
         esp_err_t err_rc_ = (x);                                                                \
         if (unlikely(err_rc_ != ESP_OK)) {                                                      \
             ret = err_rc_;                                                                      \
@@ -69,6 +73,7 @@ extern "C" {
  * and returns with the supplied 'err_code'.
  */
 #define ESP_RETURN_ON_FALSE(a, err_code, log_tag, format, ...) do {                             \
+        (void)log_tag;                                                                          \
         if (unlikely(!(a))) {                                                                   \
             return err_code;                                                                    \
         }                                                                                       \
@@ -78,6 +83,7 @@ extern "C" {
  * A version of ESP_RETURN_ON_FALSE() macro that can be called from ISR.
  */
 #define ESP_RETURN_ON_FALSE_ISR(a, err_code, log_tag, format, ...) do {                         \
+        (void)log_tag;                                                                          \
         if (unlikely(!(a))) {                                                                   \
             return err_code;                                                                    \
         }                                                                                       \
@@ -88,6 +94,7 @@ extern "C" {
  * sets the local variable 'ret' to the supplied 'err_code', and then exits by jumping to 'goto_tag'.
  */
 #define ESP_GOTO_ON_FALSE(a, err_code, goto_tag, log_tag, format, ...) do {                     \
+        (void)log_tag;                                                                          \
         if (unlikely(!(a))) {                                                                   \
             ret = err_code;                                                                     \
             goto goto_tag;                                                                      \
@@ -98,6 +105,7 @@ extern "C" {
  * A version of ESP_GOTO_ON_FALSE() macro that can be called from ISR.
  */
 #define ESP_GOTO_ON_FALSE_ISR(a, err_code, goto_tag, log_tag, format, ...) do {                 \
+        (void)log_tag;                                                                          \
         if (unlikely(!(a))) {                                                                   \
             ret = err_code;                                                                     \
             goto goto_tag;                                                                      \

+ 3 - 1
components/esp_hw_support/esp_async_memcpy.c

@@ -1,5 +1,5 @@
 /*
- * SPDX-FileCopyrightText: 2020-2021 Espressif Systems (Shanghai) CO LTD
+ * SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD
  *
  * SPDX-License-Identifier: Apache-2.0
  */
@@ -88,6 +88,8 @@ esp_err_t esp_async_memcpy_install(const async_memcpy_config_t *config, async_me
     ret = async_memcpy_impl_init(&mcp_hdl->mcp_impl);
     ESP_GOTO_ON_ERROR(ret, err, TAG, "DMA M2M init failed");
 
+    ESP_LOGD(TAG, "installed memory to memory copy channel at %p", mcp_hdl);
+
     *asmcp = mcp_hdl;
 
     async_memcpy_impl_start(&mcp_hdl->mcp_impl, (intptr_t)&mcp_hdl->out_streams[0].desc, (intptr_t)&mcp_hdl->in_streams[0].desc);

+ 1 - 0
tools/test_apps/system/build_test/sdkconfig.ci.no_error_check

@@ -0,0 +1 @@
+CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT=y