mirror of
https://github.com/espressif/esp-idf
synced 2025-03-10 09:39:10 -04: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:
commit
4f4182179f
@ -134,7 +134,7 @@ bool bootloader_common_erase_part_type_data(const char *list_erase, bool ota_dat
|
||||
fl_ota_data_erase = true;
|
||||
}
|
||||
// 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)) {
|
||||
err = esp_rom_spiflash_erase_area(partition->pos.offset, partition->pos.size);
|
||||
if (err != ESP_OK) {
|
||||
|
@ -77,7 +77,7 @@ void esp_ipc_init()
|
||||
{
|
||||
s_ipc_mutex = xSemaphoreCreateMutex();
|
||||
s_ipc_ack = xSemaphoreCreateBinary();
|
||||
char task_name[8];
|
||||
char task_name[15];
|
||||
for (int i = 0; i < portNUM_PROCESSORS; ++i) {
|
||||
sprintf(task_name,"ipc%d",i);
|
||||
s_ipc_sem[i] = xSemaphoreCreateBinary();
|
||||
|
@ -2236,7 +2236,7 @@ void init_alloc_info (
|
||||
/* exFAT: Load the object's directory entry block */
|
||||
/*------------------------------------------------*/
|
||||
static
|
||||
FRESULT load_obj_xdir (
|
||||
FRESULT load_obj_xdir (
|
||||
FF_DIR* dp, /* Blank directory object to be used to access containing direcotry */
|
||||
const FFOBJID* obj /* Object with its containing directory information */
|
||||
)
|
||||
@ -5975,7 +5975,7 @@ FRESULT f_fdisk (
|
||||
BYTE s_hd, e_hd, *p, *buf = (BYTE*)work;
|
||||
DSTATUS stat;
|
||||
DWORD sz_disk, sz_part, s_part;
|
||||
DWORD cluster_size = CLUSTER_SIZE;
|
||||
DWORD cluster_size = CLUSTER_SIZE;
|
||||
FRESULT res;
|
||||
|
||||
|
||||
@ -5991,14 +5991,17 @@ FRESULT f_fdisk (
|
||||
if (!buf) return FR_NOT_ENOUGH_CORE;
|
||||
|
||||
/* 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 (sz_disk < SUPPORTED_FLASH_SIZE) {
|
||||
cluster_size = 1;
|
||||
n = sz_disk;
|
||||
}
|
||||
if (sz_disk < SUPPORTED_FLASH_SIZE) {
|
||||
cluster_size = 1;
|
||||
n = sz_disk;
|
||||
}
|
||||
e_hd = n - 1;
|
||||
sz_cyl = cluster_size * n;
|
||||
sz_cyl = cluster_size * n;
|
||||
tot_cyl = sz_disk / sz_cyl;
|
||||
|
||||
/* Create partition table */
|
||||
@ -6011,7 +6014,7 @@ FRESULT f_fdisk (
|
||||
sz_part = (DWORD)sz_cyl * p_cyl;
|
||||
if (i == 0) { /* Exclude first track of cylinder 0 */
|
||||
s_hd = 1;
|
||||
s_part += cluster_size; sz_part -= cluster_size;
|
||||
s_part += cluster_size; sz_part -= cluster_size;
|
||||
} else {
|
||||
s_hd = 0;
|
||||
}
|
||||
|
@ -402,7 +402,7 @@ struct _reent
|
||||
char *_asctime_buf;
|
||||
|
||||
/* signal info */
|
||||
void (**(_sig_func))(int);
|
||||
void (**_sig_func)(int);
|
||||
|
||||
# ifndef _REENT_GLOBAL_ATEXIT
|
||||
/* atexit stuff */
|
||||
|
@ -176,7 +176,7 @@ static esp_err_t load_partitions()
|
||||
}
|
||||
|
||||
// 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;
|
||||
// add it to the list
|
||||
if (last == NULL) {
|
||||
|
@ -407,7 +407,7 @@ int eap_peer_blob_init(struct eap_sm *sm)
|
||||
ret = -2;
|
||||
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].data = g_wpa_client_cert;
|
||||
}
|
||||
@ -418,7 +418,7 @@ int eap_peer_blob_init(struct eap_sm *sm)
|
||||
ret = -2;
|
||||
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].data = g_wpa_private_key;
|
||||
}
|
||||
@ -429,7 +429,7 @@ int eap_peer_blob_init(struct eap_sm *sm)
|
||||
ret = -2;
|
||||
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].data = g_wpa_ca_cert;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user