Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
May 7, 2024

Conversation

arnopo
Copy link
Collaborator

@arnopo arnopo commented May 6, 2024

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
| ~~~~~~~~~~~~~^~~~~~

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
      |  ~~~~~~~~~~~~~^~~~~~

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
@arnopo arnopo mentioned this pull request May 6, 2024
@arnopo arnopo requested review from edmooring and tnmysh May 6, 2024 08:57
Copy link
Collaborator

@tnmysh tnmysh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Copy link
Contributor

@edmooring edmooring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to go.

@arnopo arnopo merged commit e0dc7bd into OpenAMP:main May 7, 2024
2 of 3 checks passed
@arnopo arnopo added this to the Release V2024.04 milestone May 7, 2024
@arnopo arnopo deleted the RPC-fix branch May 20, 2024 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants