Skip to content

Warnings in the fuzzer #712

Closed
Closed
@antoyo

Description

@antoyo

There are a few warnings in the fuzzing code.

It would be good to change the CI to forbid warnings to help catch this early.

cc @FractalFir

Here are the warnings:

warning: unused variable: `curr`
  --> src/fuzz/reduce.rs:42:13
   |
42 |     let mut curr = 0;
   |             ^^^^ help: if this is intentional, prefix it with an underscore: `_curr`
   |
   = note: `#[warn(unused_variables)]` on by default

warning: variable does not need to be mutable
  --> src/fuzz/reduce.rs:42:9
   |
42 |     let mut curr = 0;
   |         ----^^^^
   |         |
   |         help: remove this `mut`
   |
   = note: `#[warn(unused_mut)]` on by default

warning: unused `Result` that must be used
   --> src/fuzz/reduce.rs:431:9
    |
431 |         out.write_all(line.as_bytes());
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: this `Result` may be an `Err` variant, which should be handled
    = note: `#[warn(unused_must_use)]` on by default
help: use `let _ = ...` to ignore the resulting value
    |
431 |         let _ = out.write_all(line.as_bytes());
    |         +++++++

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy