snarkVM
snarkVM copied to clipboard
[Build] Warnings generated by `impl_remote!`
I see a lot of these warnings related to impl_remote! when building certain crates in snarkVM. The following is from a call to cargo test --package=snarkvm-synthesizer-program sha
warning: associated functions `store_bytes` and `remote_fetch` are never used
--> parameters/src/macros.rs:48:12
|
48 | fn store_bytes(buffer: &[u8], file_path: &std::path::Path) -> Result<(), $crate::errors::ParameterError> {
| ^^^^^^^^^^^
...
72 | fn remote_fetch(buffer: &mut Vec<u8>, url: &str) -> Result<(), $crate::errors::ParameterError> {
| ^^^^^^^^^^^^
...
355 | impl $name {
| ---------- associated functions in this implementation
|
::: parameters/src/testnet/mod.rs:179:1
|
179 | impl_remote!(InclusionV0Prover, REMOTE_URL, "resources/", "inclusion", "prover", "credits_v0");
| ---------------------------------------------------------------------------------------------- in this macro invocation
|
= note: this warning originates in the macro `impl_store_and_remote_fetch` which comes from the expansion of the macro `impl_remote` (in Nightly builds, run with -Z macro-backtrace for more info)
I also see these warnings in benchmark runs
warning: unused variable: `expected_size`
--> parameters/src/macros.rs:364:21
|
364 | let expected_size: usize =
| ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_expected_size`
|
::: parameters/src/canary/mod.rs:25:1
|
25 | impl_remote!(BondPublicProver, REMOTE_URL, "resources/", "bond_public", "prover", "credits");
| -------------------------------------------------------------------------------------------- in this macro invocation
|
= note: `#[warn(unused_variables)]` on by default
= note: this warning originates in the macro `impl_remote` (in Nightly builds, run with -Z macro-backtrace for more info)