OpenAMP / open-amp

The main OpenAMP library implementing RPMSG, Virtio, and Remoteproc for RTOS etc
https://www.openampproject.org/
Other
678 stars 278 forks source link

lib: rpmsg_rpc: fix compilation warning and bad API #587

Closed arnopo closed 1 month ago

arnopo commented 1 month ago

Fix following warning by updating bad rpc_id parameter type in the rpmsg_rpc_client_send() API. Align the rpc_id type to the one used in rpmsg_rpc_server_send().

/github/workspace/lib/service/rpmsg/rpc/rpmsg_rpc_client.c:60:9: error: ‘memcpy’ reading 8 bytes from a region of size 4 [-Werror=stringop-overread] 1286 60 | memcpy(tmpbuf, &rpc_id, MAX_FUNC_ID_LEN); 1287 | ^~~~~~~~~~~~ 1288 /github/workspace/lib/service/rpmsg/rpc/rpmsg_rpc_client.c:51:40: note: source object ‘rpc_id’ of size 4 1289 51 | unsigned int rpc_id, void *request_param, 1290 | ~~~^~~~