mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-08-06 15:15:15 +08:00
fix(example): Fix example compile warning
This commit is contained in:
@ -280,7 +280,7 @@ void aws_iot_task(void *param) {
|
||||
continue;
|
||||
}
|
||||
|
||||
ESP_LOGI(TAG, "Stack remaining for task '%s' is %d bytes", pcTaskGetTaskName(NULL), uxTaskGetStackHighWaterMark(NULL));
|
||||
ESP_LOGI(TAG, "Stack remaining for task '%s' is %lu bytes", pcTaskGetTaskName(NULL), uxTaskGetStackHighWaterMark(NULL));
|
||||
vTaskDelay(1000 / portTICK_RATE_MS);
|
||||
sprintf(cPayload, "%s : %d ", "hello from ESP32 (QOS0)", i++);
|
||||
paramsQOS0.payloadLen = strlen(cPayload);
|
||||
|
@ -316,7 +316,7 @@ void aws_iot_task(void *param) {
|
||||
}
|
||||
}
|
||||
ESP_LOGI(TAG, "*****************************************************************************************");
|
||||
ESP_LOGI(TAG, "Stack remaining for task '%s' is %d bytes", pcTaskGetTaskName(NULL), uxTaskGetStackHighWaterMark(NULL));
|
||||
ESP_LOGI(TAG, "Stack remaining for task '%s' is %lu bytes", pcTaskGetTaskName(NULL), uxTaskGetStackHighWaterMark(NULL));
|
||||
|
||||
vTaskDelay(1000 / portTICK_RATE_MS);
|
||||
}
|
||||
|
@ -2,3 +2,8 @@
|
||||
# "main" pseudo-component makefile.
|
||||
#
|
||||
# (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.)
|
||||
|
||||
CFLAGS += -Wno-error=implicit-function-declaration \
|
||||
-Wno-error=unused-label \
|
||||
-Wno-implicit-function-declaration \
|
||||
-Wno-unused-label
|
||||
|
@ -191,7 +191,6 @@ TEST(nodemcu_309) {
|
||||
fd = SPIFFS_open(FS, fname, SPIFFS_RDWR | SPIFFS_CREAT | SPIFFS_TRUNC | SPIFFS_DIRECT, 0);
|
||||
TEST_CHECK(fd > 0);
|
||||
int i;
|
||||
spiffs_stat s;
|
||||
res = SPIFFS_OK;
|
||||
u8_t err = 0;
|
||||
for (i = 1; i <= 1280; i++) {
|
||||
@ -244,7 +243,6 @@ TEST(robert) {
|
||||
sprintf(fname, "test.txt");
|
||||
fd = SPIFFS_open(FS, fname, SPIFFS_RDWR | SPIFFS_CREAT | SPIFFS_TRUNC, 0);
|
||||
TEST_CHECK(fd > 0);
|
||||
int i;
|
||||
res = SPIFFS_OK;
|
||||
char buf[500];
|
||||
memset(buf, 0xaa, 500);
|
||||
|
@ -233,7 +233,7 @@ TEST(list_dir)
|
||||
while ((pe = SPIFFS_readdir(&d, pe))) {
|
||||
printf(" %s [%04x] size:%i\n", pe->name, pe->obj_id, pe->size);
|
||||
for (i = 0; i < file_cnt; i++) {
|
||||
if (strcmp(files[i], pe->name) == 0) {
|
||||
if (strcmp(files[i], (char *)pe->name) == 0) {
|
||||
found++;
|
||||
break;
|
||||
}
|
||||
@ -276,7 +276,7 @@ TEST(open_by_dirent) {
|
||||
while ((pe = SPIFFS_readdir(&d, pe))) {
|
||||
spiffs_file fd = SPIFFS_open_by_dirent(FS, pe, SPIFFS_RDWR, 0);
|
||||
TEST_CHECK(fd >= 0);
|
||||
res = read_and_verify_fd(fd, pe->name);
|
||||
res = read_and_verify_fd(fd, (char *)pe->name);
|
||||
TEST_CHECK(res == SPIFFS_OK);
|
||||
fd = SPIFFS_open_by_dirent(FS, pe, SPIFFS_RDWR, 0);
|
||||
TEST_CHECK(fd >= 0);
|
||||
@ -872,7 +872,6 @@ TEST(lseek_simple_modification) {
|
||||
int res;
|
||||
spiffs_file fd;
|
||||
char *fname = "seekfile";
|
||||
int i;
|
||||
int len = 4096;
|
||||
fd = SPIFFS_open(FS, fname, SPIFFS_TRUNC | SPIFFS_CREAT | SPIFFS_RDWR, 0);
|
||||
TEST_CHECK(fd > 0);
|
||||
@ -914,7 +913,6 @@ TEST(lseek_modification_append) {
|
||||
int res;
|
||||
spiffs_file fd;
|
||||
char *fname = "seekfile";
|
||||
int i;
|
||||
int len = 4096;
|
||||
fd = SPIFFS_open(FS, fname, SPIFFS_TRUNC | SPIFFS_CREAT | SPIFFS_RDWR, 0);
|
||||
TEST_CHECK(fd > 0);
|
||||
|
@ -63,7 +63,7 @@ void spiffs_fs1_init(void)
|
||||
esp_spiffs_init(&config);
|
||||
}
|
||||
|
||||
void user_init(void)
|
||||
void app_main(void)
|
||||
{
|
||||
spiffs_fs1_init();
|
||||
|
||||
|
@ -170,7 +170,6 @@ static s32_t _read(u32_t addr, u32_t size, u8_t *dst) {
|
||||
}
|
||||
|
||||
static s32_t _write(u32_t addr, u32_t size, u8_t *src) {
|
||||
int i;
|
||||
//printf("wr %08x %i\n", addr, size);
|
||||
if (log_flash_ops) {
|
||||
bytes_wr += size;
|
||||
@ -375,7 +374,7 @@ void dump_flash_access_stats() {
|
||||
}
|
||||
|
||||
|
||||
static u32_t old_perc = 999;
|
||||
//static u32_t old_perc = 999;
|
||||
static void spiffs_check_cb_f(spiffs_check_type type, spiffs_check_report report,
|
||||
u32_t arg1, u32_t arg2) {
|
||||
/* if (report == SPIFFS_CHECK_PROGRESS && old_perc != arg1) {
|
||||
@ -458,7 +457,11 @@ void fs_reset_specific(u32_t addr_offset, u32_t phys_addr, u32_t phys_size,
|
||||
memset(erases,0,sizeof(erases));
|
||||
memset(_cache,0,sizeof(_cache));
|
||||
|
||||
#if SPIFFS_USE_MAGIC
|
||||
s32_t res = fs_mount_specific(phys_addr, phys_size, phys_sector_size, log_block_size, log_page_size);
|
||||
#else
|
||||
fs_mount_specific(phys_addr, phys_size, phys_sector_size, log_block_size, log_page_size);
|
||||
#endif
|
||||
|
||||
#if SPIFFS_USE_MAGIC
|
||||
if (res == SPIFFS_OK) {
|
||||
@ -539,7 +542,6 @@ void real_assert(int c, const char *n, const char *file, int l) {
|
||||
}
|
||||
|
||||
int read_and_verify(char *name) {
|
||||
s32_t res;
|
||||
int fd = SPIFFS_open(&__fs, name, SPIFFS_RDONLY, 0);
|
||||
if (fd < 0) {
|
||||
printf(" read_and_verify: could not open file %s\n", name);
|
||||
@ -891,7 +893,7 @@ int run_file_config(int cfg_count, tfile_conf* cfgs, int max_runs, int max_concu
|
||||
res = SPIFFS_remove(FS, tf->name);
|
||||
CHECK_RES(res);
|
||||
remove(make_test_fname(tf->name));
|
||||
memset(tf, 0, sizeof(tf));
|
||||
memset(tf, 0, sizeof(*tf));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -185,6 +185,8 @@ static void unity_run_single_test_by_index_parse(const char* filter, int index_m
|
||||
int test_index = strtol(filter, NULL, 10);
|
||||
if (test_index >= 1 && test_index <= index_max)
|
||||
{
|
||||
extern uint32_t system_get_cpu_freq(void);
|
||||
|
||||
uint32_t start;
|
||||
asm volatile ("rsr %0, CCOUNT" : "=r" (start));
|
||||
unity_run_single_test_by_index(test_index - 1);
|
||||
|
@ -1,7 +1,6 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "esp_sta.h"
|
||||
#include "esp_system.h"
|
||||
|
||||
#include "freertos/FreeRTOS.h"
|
||||
@ -18,6 +17,5 @@ void unityTask(void *pvParameters)
|
||||
|
||||
void app_main(void)
|
||||
{
|
||||
wifi_station_set_auto_connect(false);
|
||||
xTaskCreate(unityTask, "unityTask", 8192, NULL, UNITY_FREERTOS_PRIORITY, NULL);
|
||||
}
|
||||
|
Reference in New Issue
Block a user