Skip to content

Conversation

@cakebaker
Copy link
Contributor

I noticed the following warning in the Android jobs of the CI (see, for example, https://github.com/uutils/coreutils/actions/runs/15039807606/job/42268624578#step:16:836):

[2025-05-15 08:08:33] warning[E0133]: call to unsafe function `libc::syscall` is unsafe and requires unsafe block
[2025-05-15 08:08:33]   --> src/uu/sync/src/sync.rs:45:9
[2025-05-15 08:08:33]    |
[2025-05-15 08:08:33] 45 |         libc::syscall(libc::SYS_sync);
[2025-05-15 08:08:33]    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function

This PR fixes this warning by moving the function call inside the already existing unsafe block used for the non-Android code.

@sylvestre sylvestre force-pushed the sync_move_function_call_to_unsafe_block branch from c69ce44 to cdca6d6 Compare May 19, 2025 09:18
@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/timeout/timeout (passes in this run but fails in the 'main' branch)

@sylvestre sylvestre merged commit a7b005c into uutils:main May 20, 2025
70 checks passed
@cakebaker cakebaker deleted the sync_move_function_call_to_unsafe_block branch May 20, 2025 07:45
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.

2 participants