fix(system): format esp_common, app_format and bootloader_format with astyle

This commit is contained in:
Marius Vikhammer
2024-01-29 09:52:55 +08:00
parent e8dee79bb5
commit 043dae211e
10 changed files with 5 additions and 18 deletions
@@ -303,7 +303,6 @@ extern "C" {
#endif // !CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT
#ifdef __cplusplus
}
#endif
-1
View File
@@ -36,7 +36,6 @@ typedef int esp_err_t;
#define ESP_ERR_NOT_FINISHED 0x10C /*!< Operation has not fully completed */
#define ESP_ERR_NOT_ALLOWED 0x10D /*!< Operation is not allowed */
#define ESP_ERR_WIFI_BASE 0x3000 /*!< Starting number of WiFi error codes */
#define ESP_ERR_MESH_BASE 0x4000 /*!< Starting number of MESH error codes */
#define ESP_ERR_FLASH_BASE 0x6000 /*!< Starting number of flash error codes */
+2 -2
View File
@@ -893,7 +893,7 @@ const char *esp_err_to_name(esp_err_t code)
#ifdef CONFIG_ESP_ERR_TO_NAME_LOOKUP
size_t i;
for (i = 0; i < sizeof(esp_err_msg_table)/sizeof(esp_err_msg_table[0]); ++i) {
for (i = 0; i < sizeof(esp_err_msg_table) / sizeof(esp_err_msg_table[0]); ++i) {
if (esp_err_msg_table[i].code == code) {
return esp_err_msg_table[i].msg;
}
@@ -908,7 +908,7 @@ const char *esp_err_to_name_r(esp_err_t code, char *buf, size_t buflen)
#ifdef CONFIG_ESP_ERR_TO_NAME_LOOKUP
size_t i;
for (i = 0; i < sizeof(esp_err_msg_table)/sizeof(esp_err_msg_table[0]); ++i) {
for (i = 0; i < sizeof(esp_err_msg_table) / sizeof(esp_err_msg_table[0]); ++i) {
if (esp_err_msg_table[i].code == code) {
strlcpy(buf, esp_err_msg_table[i].msg, buflen);
return buf;
@@ -42,7 +42,7 @@ const char *esp_err_to_name(esp_err_t code)
#ifdef CONFIG_ESP_ERR_TO_NAME_LOOKUP
size_t i;
for (i = 0; i < sizeof(esp_err_msg_table)/sizeof(esp_err_msg_table[0]); ++i) {
for (i = 0; i < sizeof(esp_err_msg_table) / sizeof(esp_err_msg_table[0]); ++i) {
if (esp_err_msg_table[i].code == code) {
return esp_err_msg_table[i].msg;
}
@@ -57,7 +57,7 @@ const char *esp_err_to_name_r(esp_err_t code, char *buf, size_t buflen)
#ifdef CONFIG_ESP_ERR_TO_NAME_LOOKUP
size_t i;
for (i = 0; i < sizeof(esp_err_msg_table)/sizeof(esp_err_msg_table[0]); ++i) {
for (i = 0; i < sizeof(esp_err_msg_table) / sizeof(esp_err_msg_table[0]); ++i) {
if (esp_err_msg_table[i].code == code) {
strlcpy(buf, esp_err_msg_table[i].msg, buflen);
return buf;
@@ -8,7 +8,6 @@
#include "unity_test_runner.h"
#include "esp_heap_caps.h"
// Some resources are lazy allocated (newlib locks) in the esp_common code, the threshold is left for that case
#define TEST_MEMORY_LEAK_THRESHOLD (-100)
@@ -28,8 +27,6 @@ void setUp(void)
before_free_32bit = heap_caps_get_free_size(MALLOC_CAP_32BIT);
}
void tearDown(void)
{
size_t after_free_8bit = heap_caps_get_free_size(MALLOC_CAP_8BIT);
@@ -29,7 +29,6 @@ extern int _ext_ram_noinit_end;
extern int _ext_ram_bss_start;
extern int _ext_ram_bss_end;
//Variables for test: Attributes place variables into correct sections
static __NOINIT_ATTR uint32_t s_noinit;
#if SOC_RTC_MEM_SUPPORTED
@@ -119,7 +118,6 @@ TEST_CASE_MULTIPLE_STAGES("Spiram test noinit memory", "[psram][ld]", write_spir
#endif // CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY
#if CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY
#define TEST_BSS_NUM (256 * 1024)
static EXT_RAM_BSS_ATTR uint32_t s_bss_buffer[TEST_BSS_NUM];