Why does `sui move build` show framework warnnings?

warning[W09008]: unused function
┌─ /home/shiqi/.move/https___github_com_MystenLabs_sui_git_framework__devnet/crates/sui-framework/packages/sui-framework/sources/balance.move:124:9

124 │ fun create_staking_rewards(value: u64, ctx: &TxContext): Balance {
│ ^^^^^^^^^^^^^^^^^^^^^^ The non-‘public’, non-‘entry’ function ‘create_staking_rewards’ is never called. Consider removing it.

= This warning can be suppressed with ‘#[allow(unused_function)]’ applied to the ‘module’ or module member (‘const’, ‘fun’, or ‘struct’)

1 Like

A non-entry or non-public is only reachable by code within the module and the linter isn’t seeing anything calling the function.

Author should add the appropriate #[allow(unused_function)]

Also, changing the dependency rev in Move.toml may eliminate the message.

1 Like

I understand what “unused function” warning is for. I am reporting it shouldn’t not report anything in referenced code. Does Rust compiler report anything from std lib?

1 Like

this only happens during sui move test

1 Like

@shiqicao this shouldn’t be an issue anymore starting on v1.7.0 and up.

2 Likes