ipc: fix errors for GCC 8 support
components/esp32/ipc.c: In function 'esp_ipc_init': components/esp32/ipc.c:82:31: error: '%d' directive writing between 1 and 11 bytes into a region of size 5 [-Werror=format-overflow=] sprintf(task_name,"ipc%d",i); ^~ components/esp32/ipc.c:82:27: note: directive argument in the range [-2147483648, 1] sprintf(task_name,"ipc%d",i); ^~~~~~~ components/esp32/ipc.c:82:9: note: 'sprintf' output between 5 and 15 bytes into a destination of size 8 sprintf(task_name,"ipc%d",i); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
This commit is contained in:
parent
93f6700be7
commit
2a810a318f
1 changed files with 1 additions and 1 deletions
|
@ -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();
|
||||||
|
|
Loading…
Reference in a new issue