Skip to content

Commit 401b395

Browse files
committed
fix(hal): supress overlapping buffers warning for GCC analyzer
1 parent eee58bb commit 401b395

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

components/hal/twai_hal_iram.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <stddef.h>
88
#include <string.h>
99
#include "sdkconfig.h"
10+
#include "esp_compiler.h"
1011
#include "hal/twai_hal.h"
1112

1213
#ifdef CONFIG_TWAI_ERRATA_FIX_RX_FIFO_CORRUPT
@@ -194,6 +195,8 @@ void twai_hal_set_tx_buffer_and_transmit(twai_hal_context_t *hal_ctx, twai_hal_f
194195
return;
195196
}
196197
//Save transmitted frame in case we need to retry
198+
ESP_COMPILER_DIAGNOSTIC_PUSH_IGNORE("-Wanalyzer-overlapping-buffers") // TODO IDF-11085
197199
memcpy(&hal_ctx->tx_frame_save, tx_frame, sizeof(twai_hal_frame_t));
200+
ESP_COMPILER_DIAGNOSTIC_POP("-Wanalyzer-overlapping-buffers")
198201
#endif //defined(CONFIG_TWAI_ERRATA_FIX_RX_FRAME_INVALID) || defined(CONFIG_TWAI_ERRATA_FIX_RX_FIFO_CORRUPT)
199202
}

0 commit comments

Comments
 (0)