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

[Bug] Unused parameter 'self' in aptos-stdlib/sources/pool_u64_unbound.move - multiply_then_divide #14865

Closed
0xblockbard opened this issue Oct 4, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@0xblockbard
Copy link

🐛 Bug

I get this warning whenever any compilation or test is run.

warning[W09002]: unused variable
    ┌─ /Users/user/.move/https___github_com_aptos-labs_aptos-core_git_mainnet/aptos-move/framework/aptos-framework/../aptos-stdlib/sources/pool_u64_unbound.move:258:37
    │
258 │     public fun multiply_then_divide(self: &Pool, x: u128, y: u128, z: u128): u128 {
    │                                     ^^^^ Unused parameter 'self'. Consider removing or prefixing with an underscore: '_self'

warning[W09002]: unused variable
    ┌─ /Users/user/.move/https___github_com_aptos-labs_aptos-core_git_mainnet/aptos-move/framework/aptos-framework/../aptos-stdlib/sources/pool_u64.move:261:37
    │
261 │     public fun multiply_then_divide(self: &Pool, x: u64, y: u64, z: u64): u64 {
    │                                     ^^^^ Unused parameter 'self'. Consider removing or prefixing with an underscore: '_self'

It does not break anything, but it would be really nice if this could be fixed so it doesn't show up when compiling or running tests

@0xblockbard 0xblockbard added the bug Something isn't working label Oct 4, 2024
@rahxephon89
Copy link
Contributor

rahxephon89 commented Oct 7, 2024

Hi @0xblockbard, which version of CLI are you using? Also, are you compiling using Compiler V2 (by specifying --move-2)? With this PR: #14368, no warning should be generated.

@0xblockbard
Copy link
Author

Hi @0xblockbard, which version of CLI are you using? Also, are you compiling using Compiler V2 (by specifying --move-2)? With this PR: #14368, no warning should be generated.

Thanks for getting back! Have upgraded aptos with brew upgrade aptos and compiling and testing with Compiler V2 works fine now without any issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants