mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-03 20:54:32 +02:00
Merge branch 'bugfix/gcc8_compile_errors' into 'master'
Fix GCC 8 compile errors See merge request idf/esp-idf!2466
This commit is contained in:
@@ -134,7 +134,7 @@ bool bootloader_common_erase_part_type_data(const char *list_erase, bool ota_dat
|
|||||||
fl_ota_data_erase = true;
|
fl_ota_data_erase = true;
|
||||||
}
|
}
|
||||||
// partition->label is not null-terminated string.
|
// partition->label is not null-terminated string.
|
||||||
strncpy(label, (char *)&partition->label, sizeof(partition->label));
|
strncpy(label, (char *)&partition->label, sizeof(label) - 1);
|
||||||
if (fl_ota_data_erase == true || (bootloader_common_label_search(list_erase, label) == true)) {
|
if (fl_ota_data_erase == true || (bootloader_common_label_search(list_erase, label) == true)) {
|
||||||
err = esp_rom_spiflash_erase_area(partition->pos.offset, partition->pos.size);
|
err = esp_rom_spiflash_erase_area(partition->pos.offset, partition->pos.size);
|
||||||
if (err != ESP_OK) {
|
if (err != ESP_OK) {
|
||||||
|
@@ -77,7 +77,7 @@ void esp_ipc_init()
|
|||||||
{
|
{
|
||||||
s_ipc_mutex = xSemaphoreCreateMutex();
|
s_ipc_mutex = xSemaphoreCreateMutex();
|
||||||
s_ipc_ack = xSemaphoreCreateBinary();
|
s_ipc_ack = xSemaphoreCreateBinary();
|
||||||
char task_name[8];
|
char task_name[15];
|
||||||
for (int i = 0; i < portNUM_PROCESSORS; ++i) {
|
for (int i = 0; i < portNUM_PROCESSORS; ++i) {
|
||||||
sprintf(task_name,"ipc%d",i);
|
sprintf(task_name,"ipc%d",i);
|
||||||
s_ipc_sem[i] = xSemaphoreCreateBinary();
|
s_ipc_sem[i] = xSemaphoreCreateBinary();
|
||||||
|
@@ -5991,7 +5991,10 @@ FRESULT f_fdisk (
|
|||||||
if (!buf) return FR_NOT_ENOUGH_CORE;
|
if (!buf) return FR_NOT_ENOUGH_CORE;
|
||||||
|
|
||||||
/* Determine the CHS without any consideration of the drive geometry */
|
/* Determine the CHS without any consideration of the drive geometry */
|
||||||
for (n = 16; n < 256 && sz_disk / n / cluster_size > 1024; n *= 2) ;
|
for (n = 16; n < 256 && sz_disk / n / cluster_size > 1024; n *= 2)
|
||||||
|
{
|
||||||
|
;
|
||||||
|
}
|
||||||
if (n == 256) n--;
|
if (n == 256) n--;
|
||||||
if (sz_disk < SUPPORTED_FLASH_SIZE) {
|
if (sz_disk < SUPPORTED_FLASH_SIZE) {
|
||||||
cluster_size = 1;
|
cluster_size = 1;
|
||||||
|
@@ -402,7 +402,7 @@ struct _reent
|
|||||||
char *_asctime_buf;
|
char *_asctime_buf;
|
||||||
|
|
||||||
/* signal info */
|
/* signal info */
|
||||||
void (**(_sig_func))(int);
|
void (**_sig_func)(int);
|
||||||
|
|
||||||
# ifndef _REENT_GLOBAL_ATEXIT
|
# ifndef _REENT_GLOBAL_ATEXIT
|
||||||
/* atexit stuff */
|
/* atexit stuff */
|
||||||
|
@@ -176,7 +176,7 @@ static esp_err_t load_partitions()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// it->label may not be zero-terminated
|
// it->label may not be zero-terminated
|
||||||
strncpy(item->info.label, (const char*) it->label, sizeof(it->label));
|
strncpy(item->info.label, (const char*) it->label, sizeof(item->info.label) - 1);
|
||||||
item->info.label[sizeof(it->label)] = 0;
|
item->info.label[sizeof(it->label)] = 0;
|
||||||
// add it to the list
|
// add it to the list
|
||||||
if (last == NULL) {
|
if (last == NULL) {
|
||||||
|
@@ -407,7 +407,7 @@ int eap_peer_blob_init(struct eap_sm *sm)
|
|||||||
ret = -2;
|
ret = -2;
|
||||||
goto _out;
|
goto _out;
|
||||||
}
|
}
|
||||||
os_strncpy(sm->blob[0].name, CLIENT_CERT_NAME, BLOB_NAME_LEN);
|
os_strncpy(sm->blob[0].name, CLIENT_CERT_NAME, BLOB_NAME_LEN+1);
|
||||||
sm->blob[0].len = g_wpa_client_cert_len;
|
sm->blob[0].len = g_wpa_client_cert_len;
|
||||||
sm->blob[0].data = g_wpa_client_cert;
|
sm->blob[0].data = g_wpa_client_cert;
|
||||||
}
|
}
|
||||||
@@ -418,7 +418,7 @@ int eap_peer_blob_init(struct eap_sm *sm)
|
|||||||
ret = -2;
|
ret = -2;
|
||||||
goto _out;
|
goto _out;
|
||||||
}
|
}
|
||||||
os_strncpy(sm->blob[1].name, PRIVATE_KEY_NAME, BLOB_NAME_LEN);
|
os_strncpy(sm->blob[1].name, PRIVATE_KEY_NAME, BLOB_NAME_LEN+1);
|
||||||
sm->blob[1].len = g_wpa_private_key_len;
|
sm->blob[1].len = g_wpa_private_key_len;
|
||||||
sm->blob[1].data = g_wpa_private_key;
|
sm->blob[1].data = g_wpa_private_key;
|
||||||
}
|
}
|
||||||
@@ -429,7 +429,7 @@ int eap_peer_blob_init(struct eap_sm *sm)
|
|||||||
ret = -2;
|
ret = -2;
|
||||||
goto _out;
|
goto _out;
|
||||||
}
|
}
|
||||||
os_strncpy(sm->blob[2].name, CA_CERT_NAME, BLOB_NAME_LEN);
|
os_strncpy(sm->blob[2].name, CA_CERT_NAME, BLOB_NAME_LEN+1);
|
||||||
sm->blob[2].len = g_wpa_ca_cert_len;
|
sm->blob[2].len = g_wpa_ca_cert_len;
|
||||||
sm->blob[2].data = g_wpa_ca_cert;
|
sm->blob[2].data = g_wpa_ca_cert;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user